ReactOS 0.4.16-dev-117-g38f21f9
CMenuDeskBar.cpp File Reference
#include "shellmenu.h"
#include <atlwin.h>
#include <shlwapi_undoc.h>
#include "CMenuDeskBar.h"
Include dependency graph for CMenuDeskBar.cpp:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (CMenuDeskBar)
 
static void AdjustForExcludeArea (BOOL alignLeft, BOOL alignTop, BOOL preferVertical, PINT px, PINT py, INT cx, INT cy, RECTL rcExclude)
 
HRESULT WINAPI RSHELL_CMenuDeskBar_CreateInstance (REFIID riid, LPVOID *ppv)
 

Function Documentation

◆ AdjustForExcludeArea()

static void AdjustForExcludeArea ( BOOL  alignLeft,
BOOL  alignTop,
BOOL  preferVertical,
PINT  px,
PINT  py,
INT  cx,
INT  cy,
RECTL  rcExclude 
)
static

Definition at line 285 of file CMenuDeskBar.cpp.

285 {
286 RECT rcWindow = { *px, *py, *px + cx, *py + cy };
287
288 if (rcWindow.right > rcExclude.left && rcWindow.left < rcExclude.right &&
289 rcWindow.bottom > rcExclude.top && rcWindow.top < rcExclude.bottom)
290 {
291 if (preferVertical)
292 {
293 if (alignTop && rcWindow.bottom > rcExclude.top)
294 *py = rcExclude.top - cy;
295 else if (!alignTop && rcWindow.top < rcExclude.bottom)
296 *py = rcExclude.bottom;
297 else if (alignLeft && rcWindow.right > rcExclude.left)
298 *px = rcExclude.left - cx;
299 else if (!alignLeft && rcWindow.left < rcExclude.right)
300 *px = rcExclude.right;
301 }
302 else
303 {
304 if (alignLeft && rcWindow.right > rcExclude.left)
305 *px = rcExclude.left - cx;
306 else if (!alignLeft && rcWindow.left < rcExclude.right)
307 *px = rcExclude.right;
308 else if (alignTop && rcWindow.bottom > rcExclude.top)
309 *py = rcExclude.top - cy;
310 else if (!alignTop && rcWindow.top < rcExclude.bottom)
311 *py = rcExclude.bottom;
312 }
313 }
314}
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
long bottom
Definition: polytest.cpp:53
long right
Definition: polytest.cpp:53
long top
Definition: polytest.cpp:53
long left
Definition: polytest.cpp:53
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306

Referenced by CMenuDeskBar::Popup().

◆ RSHELL_CMenuDeskBar_CreateInstance()

HRESULT WINAPI RSHELL_CMenuDeskBar_CreateInstance ( REFIID  riid,
LPVOID ppv 
)

Definition at line 855 of file CMenuDeskBar.cpp.

856{
857 return ShellObjectCreator<CMenuDeskBar>(riid, ppv);
858}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39

Referenced by CRShellClassFactory::CreateInstance().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( CMenuDeskBar  )