ReactOS  0.4.15-dev-994-ga9f6032
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 }
LONG top
Definition: windef.h:307
long bottom
Definition: polytest.cpp:53
LONG left
Definition: windef.h:306
LONG right
Definition: windef.h:308
long right
Definition: polytest.cpp:53
long top
Definition: polytest.cpp:53
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:581
long left
Definition: polytest.cpp:53
_Out_opt_ int * cx
Definition: commctrl.h:581
LONG bottom
Definition: windef.h:309

Referenced by CMenuDeskBar::Popup().

◆ RSHELL_CMenuDeskBar_CreateInstance()

HRESULT WINAPI RSHELL_CMenuDeskBar_CreateInstance ( REFIID  riid,
LPVOID ppv 
)

Definition at line 851 of file CMenuDeskBar.cpp.

852 {
853  return ShellObjectCreator<CMenuDeskBar>(riid, ppv);
854 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39

Referenced by CRShellClassFactory::CreateInstance().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( CMenuDeskBar  )