ReactOS 0.4.17-dev-309-gee60345
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 298 of file CMenuDeskBar.cpp.

298 {
299 RECT rcWindow = { *px, *py, *px + cx, *py + cy };
300
301 if (rcWindow.right > rcExclude.left && rcWindow.left < rcExclude.right &&
302 rcWindow.bottom > rcExclude.top && rcWindow.top < rcExclude.bottom)
303 {
304 if (preferVertical)
305 {
306 if (alignTop && rcWindow.bottom > rcExclude.top)
307 *py = rcExclude.top - cy;
308 else if (!alignTop && rcWindow.top < rcExclude.bottom)
309 *py = rcExclude.bottom;
310 else if (alignLeft && rcWindow.right > rcExclude.left)
311 *px = rcExclude.left - cx;
312 else if (!alignLeft && rcWindow.left < rcExclude.right)
313 *px = rcExclude.right;
314 }
315 else
316 {
317 if (alignLeft && rcWindow.right > rcExclude.left)
318 *px = rcExclude.left - cx;
319 else if (!alignLeft && rcWindow.left < rcExclude.right)
320 *px = rcExclude.right;
321 else if (alignTop && rcWindow.bottom > rcExclude.top)
322 *py = rcExclude.top - cy;
323 else if (!alignTop && rcWindow.top < rcExclude.bottom)
324 *py = rcExclude.bottom;
325 }
326 }
327}
_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:108
LONG bottom
Definition: windef.h:109
LONG top
Definition: windef.h:107
LONG left
Definition: windef.h:106

Referenced by CMenuDeskBar::Popup().

◆ RSHELL_CMenuDeskBar_CreateInstance()

HRESULT WINAPI RSHELL_CMenuDeskBar_CreateInstance ( REFIID  riid,
LPVOID ppv 
)

Definition at line 868 of file CMenuDeskBar.cpp.

869{
870 return ShellObjectCreator<CMenuDeskBar>(riid, ppv);
871}
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  )