116 if (
IsEqualIID(*pguidCmdGroup, CGID_MenuDeskBar))
128 else if (
IsEqualIID(*pguidCmdGroup, CLSID_MenuBand))
134 CComPtr<IShellMenu2> pSM;
136 pSM->InvalidateItem(
NULL, SMINV_REFRESH);
144 else if (
IsEqualIID(*pguidCmdGroup, IID_IDeskBarClient))
173 if (
IsEqualGUID(guidService, SID_SMenuBandBottom) ||
174 IsEqualGUID(guidService, SID_SMenuBandBottomSelected) ||
209 CComPtr<IDeskBarClient> pDeskBandClient;
218 pDeskBandClient->SetDeskBarSite(
NULL);
220 pDeskBandClient =
NULL;
224 if (punkClient ==
NULL)
240 hr = pDeskBandClient->SetDeskBarSite(
static_cast<IDeskBar*
>(
this));
249 if (ppunkClient ==
NULL)
299 RECT rcWindow = { *px, *py, *px +
cx, *py +
cy };
306 if (alignTop && rcWindow.
bottom > rcExclude.
top)
307 *py = rcExclude.
top -
cy;
308 else if (!alignTop && rcWindow.
top < 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;
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)
332 CComPtr<IOleCommandTarget>
oct;
333 CComPtr<IInputObject>
io;
334 CComPtr<IDeskBand> band;
335 CComPtr<IDeskBarClient> dbc;
349 hr = dbc->SetModeDBC(1);
353 hr = dbc->UIActivateDBC(
TRUE);
358 hr = dbc->GetSize(0, &rc);
364 const int CMD_EXEC_OPT = 0;
382 int cxWorkArea = rcWorkArea.
right - rcWorkArea.
left;
383 int cyWorkArea = rcWorkArea.
bottom - rcWorkArea.
top;
398 preferVertical =
TRUE;
405 preferVertical =
TRUE;
448 if ((ppt->
x +
cx) > rcWorkArea.
right &&
x >= rcWorkArea.
left)
461 if (
y < rcWorkArea.
top && (ppt->
y +
cy) <= rcWorkArea.
bottom)
474 if ((ppt->
y +
cy) > rcWorkArea.
bottom &&
y >= rcWorkArea.
top)
489 if (
x < rcWorkArea.
left)
498 if (
y < rcWorkArea.
top)
531 const int CMD_SELECT = 5;
546 const int CMD_EXEC_OPT = iIcon ? 0 : 2;
608 CComPtr<IDeskBar> safeThis =
this;
611 TRACE(
"OnSelect dwSelectType=%d\n",
this, dwSelectType);
612 switch (dwSelectType)
627 return oldParent->OnSelect(dwSelectType);
636 CComPtr<IDeskBarClient> dbc;
640 CComPtr<IDeskBar> safeThis =
this;
660 hr = dbc->UIActivateDBC(
FALSE);
719 CComPtr<IWinEventHandler> winEventHandler;
753 WARN(
"GetClientRect failed\n");
761 if (!
::StretchBlt(
hdc, 0, 0, bx,
cy -
by,
hdcMem, 0, 0, bx, 1,
SRCCOPY))
762 WARN(
"StretchBlt failed\n");
765 WARN(
"BitBlt failed\n");
785 CComPtr<IDeskBar> db;
790 CComPtr<IUnknown>
punk;
792 hr = db->GetClient(&
punk);
825 if (
wParam == SPI_SETFLATMENU)
870 return ShellObjectCreator<CMenuDeskBar>(
riid,
ppv);
ios_base &_STLP_CALL oct(ios_base &__s)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define STDMETHODCALLTYPE
HRESULT WINAPI IUnknown_QueryService(IUnknown *obj, REFGUID sid, REFIID iid, void **out)
HRESULT WINAPI IUnknown_GetSite(IUnknown *unk, REFIID iid, void **site)
HRESULT WINAPI IUnknown_UIActivateIO(IUnknown *unknown, BOOL activate, LPMSG msg)
HRESULT WINAPI IUnknown_QueryServiceExec(IUnknown *lpUnknown, REFIID service, const GUID *group, DWORD cmdId, DWORD cmdOpt, VARIANT *pIn, VARIANT *pOut)
HRESULT WINAPI IUnknown_TranslateAcceleratorIO(IUnknown *lpUnknown, LPMSG lpMsg)
LONG WINAPI SHSetWindowBits(HWND hwnd, INT offset, UINT mask, UINT flags)
HRESULT WINAPI IUnknown_HasFocusIO(IUnknown *lpUnknown)
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
HRESULT WINAPI IUnknown_OnFocusChangeIS(LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
#define FAILED_UNEXPECTEDLY
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Height *Stride) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Stride)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK io
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
_Out_opt_ int _Out_opt_ int * cy
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
int WINAPI FrameRect(_In_ HDC, _In_ LPCRECT, _In_ HBRUSH)
HDC WINAPI GetWindowDC(_In_opt_ HWND)
BOOL WINAPI AdjustWindowRect(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI DestroyWindow(_In_ HWND)
#define IID_PPV_ARG(Itype, ppType)