116 if (
IsEqualIID(*pguidCmdGroup, CGID_MenuDeskBar))
128 if (
IsEqualIID(*pguidCmdGroup, CGID_Explorer))
131 else if (
IsEqualIID(*pguidCmdGroup, IID_IDeskBarClient))
160 if (
IsEqualGUID(guidService, SID_SMenuBandBottom) ||
161 IsEqualGUID(guidService, SID_SMenuBandBottomSelected) ||
196 CComPtr<IDeskBarClient> pDeskBandClient;
205 pDeskBandClient->SetDeskBarSite(
NULL);
207 pDeskBandClient =
NULL;
211 if (punkClient ==
NULL)
227 hr = pDeskBandClient->SetDeskBarSite(
static_cast<IDeskBar*
>(
this));
236 if (ppunkClient ==
NULL)
286 RECT rcWindow = { *px, *py, *px +
cx, *py +
cy };
293 if (alignTop && rcWindow.
bottom > rcExclude.
top)
294 *py = rcExclude.
top -
cy;
295 else if (!alignTop && rcWindow.
top < 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;
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)
319 CComPtr<IOleCommandTarget>
oct;
320 CComPtr<IInputObject>
io;
321 CComPtr<IDeskBand> band;
322 CComPtr<IDeskBarClient> dbc;
336 hr = dbc->SetModeDBC(1);
340 hr = dbc->UIActivateDBC(
TRUE);
345 hr = dbc->GetSize(0, &rc);
351 const int CMD_EXEC_OPT = 0;
364 rc.
right += bm.bmWidth;
369 int cxWorkArea = rcWorkArea.
right - rcWorkArea.
left;
370 int cyWorkArea = rcWorkArea.
bottom - rcWorkArea.
top;
385 preferVertical =
TRUE;
392 preferVertical =
TRUE;
435 if ((ppt->
x +
cx) > rcWorkArea.
right &&
x >= rcWorkArea.
left)
448 if (
y < rcWorkArea.
top && (ppt->
y +
cy) <= rcWorkArea.
bottom)
461 if ((ppt->
y +
cy) > rcWorkArea.
bottom &&
y >= rcWorkArea.
top)
476 if (
x < rcWorkArea.
left)
485 if (
y < rcWorkArea.
top)
518 const int CMD_SELECT = 5;
533 const int CMD_EXEC_OPT = iIcon ? 0 : 2;
595 CComPtr<IDeskBar> safeThis =
this;
598 TRACE(
"OnSelect dwSelectType=%d\n",
this, dwSelectType);
599 switch (dwSelectType)
614 return oldParent->OnSelect(dwSelectType);
623 CComPtr<IDeskBarClient> dbc;
627 CComPtr<IDeskBar> safeThis =
this;
647 hr = dbc->UIActivateDBC(
FALSE);
692 rc.
left += bm.bmWidth;
706 CComPtr<IWinEventHandler> winEventHandler;
740 WARN(
"GetClientRect failed\n");
742 const int bx = bm.bmWidth;
743 const int by = bm.bmHeight;
746 TRACE(
"Painting banner: %d by %d\n", bm.bmWidth, bm.bmHeight);
748 if (!
::StretchBlt(
hdc, 0, 0, bx,
cy -
by,
hdcMem, 0, 0, bx, 1,
SRCCOPY))
749 WARN(
"StretchBlt failed\n");
752 WARN(
"BitBlt failed\n");
772 CComPtr<IDeskBar> db;
777 CComPtr<IUnknown> punk;
779 hr = db->GetClient(&punk);
812 if (
wParam == SPI_SETFLATMENU)
857 return ShellObjectCreator<CMenuDeskBar>(
riid,
ppv);
ios_base &_STLP_CALL oct(ios_base &__s)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define STDMETHODCALLTYPE
#define FAILED_UNEXPECTEDLY(hr)
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_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
HRESULT WINAPI IUnknown_GetSite(LPUNKNOWN lpUnknown, REFIID iid, PVOID *lppSite)
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
HRESULT WINAPI IUnknown_OnFocusChangeIS(LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
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
_Out_opt_ int _Out_opt_ int * cy
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
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)