22#include <commoncontrols.h>
33#define UNIMPLEMENTED TRACE("%s is UNIMPLEMENTED!\n", __FUNCTION__)
36 m_staticToolbar(
NULL),
41 m_subMenuParent(
NULL),
47 m_topLevelWindow(
NULL),
194 if (pUnkSite ==
NULL)
235 CComPtr<IOleWindow> pTopLevelWindow;
267 if (phwnd) *phwnd =
NULL;
274 SIZE maxStatic = { 0 };
275 SIZE maxShlFld = { 0 };
293 int syStatic = maxStatic.
cy;
294 int syShlFld = sy - syStatic;
347 SIZE minStatic = { 0 };
348 SIZE minShlFld = { 0 };
349 SIZE maxStatic = { 0 };
350 SIZE maxShlFld = { 0 };
351 SIZE intStatic = { 0 };
352 SIZE intShlFld = { 0 };
452 TRACE(
"Child object should have removed itself.\n");
489 CComPtr<IOleWindow> pTopLevelWindow;
518 else if (nCmdID == 19)
522 else if (nCmdID == 5)
524 if (nCmdexecopt == 0)
544 if (
IsEqualIID(guidService, SID_SMenuBandChild) ||
545 IsEqualIID(guidService, SID_SMenuBandBottom) ||
546 IsEqualIID(guidService, SID_SMenuBandBottomSelected))
564 switch (dwSelectType)
659 (*ppunkClient)->AddRef();
784 smData.
punk =
static_cast<IShellMenu2*
>(
this);
827 CComPtr<IContextMenu> ctxMenu = contextMenu;
834 TRACE(
"Before Query\n");
835 UINT cmf = CMF_NORMAL;
837 cmf |= CMF_EXTENDEDVERBS;
839 const UINT idCmdFirst = 100, idCmdLast = 0xffff;
843 TRACE(
"Query failed\n");
852 TRACE(
"Before Tracking\n");
861 TRACE(
"Before InvokeCommand\n");
862 CMINVOKECOMMANDINFO cmi = {
sizeof(cmi), 0,
hwnd };
865 cmi.fMask |= CMIC_MASK_SHIFT_DOWN;
867 cmi.fMask |= CMIC_MASK_CONTROL_DOWN;
869 TRACE(
"InvokeCommand returned hr=%08x\n",
hr);
873 TRACE(
"TrackPopupMenu failed. Code=%d, LastError=%d\n", uCommand,
GetLastError());
943 hr =
tb->KeyboardItemChange(change);
964 CComPtr<CMenuBand> safeThis =
this;
1009 tb->PrepareExecuteItem(
item);
1014 TRACE(
"Menu closed, executing item...\n");
1065 CComPtr<IBandSite> pBandSite;
1066 CComPtr<IDeskBar> pDeskBar;
1077 hr = pDeskBar->SetClient(pBandSite);
1081 hr = pBandSite->AddBand(childShellMenu);
1086 CComPtr<IMenuPopup> popup;
1100 if (keyInitiated &&
m_dwFlags & SMINIT_VERTICAL)
1103 popup->Popup(pAt, pExclude,
flags);
1322 return ShellObjectCreator<CMenuBand>(
riid,
ppv);
HRESULT WINAPI RSHELL_CMenuBand_CreateInstance(REFIID riid, LPVOID *ppv)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define STDMETHODCALLTYPE
HRESULT _CallCBWithItemPidl(LPITEMIDLIST pidl, UINT uMsg, WPARAM wParam, LPARAM lParam)
STDMETHOD() InvalidateItem(LPSMDATA psmd, DWORD dwFlags) override
STDMETHOD() SetMinWidth(THIS) override
STDMETHOD() Popup(POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags) override
STDMETHOD() UIActivateIO(BOOL fActivate, LPMSG lpMsg) override
STDMETHOD() OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override
STDMETHOD() IsWindowOwner(HWND hWnd) override
STDMETHOD() OnSelect(DWORD dwSelectType) override
HRESULT _OnPopupSubMenu(IShellMenu *childShellMenu, POINTL *pAt, RECTL *pExclude, BOOL mouseInitiated)
STDMETHOD() Initialize(IShellMenuCallback *psmc, UINT uId, UINT uIdAncestor, DWORD dwFlags) override
HRESULT _GetTopLevelWindow(HWND *topLevel)
STDMETHOD() DoDefaultAction(THIS) override
STDMETHOD() GetSubMenu(THIS) override
STDMETHOD() HasFocusIO() override
STDMETHOD() SetClient(IUnknown *punkClient) override
STDMETHOD() GetSizeMax(ULARGE_INTEGER *pcbSize) override
CMenuSFToolbar * m_SFToolbar
CMenuFocusManager * m_focusManager
HRESULT _TrackContextMenu(IContextMenu *popup, INT x, INT y)
HRESULT _TrackSubMenu(HMENU popup, INT x, INT y, RECT &rcExclude)
STDMETHOD() QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) override
STDMETHOD() TranslateMenuMessage(MSG *pmsg, LRESULT *plRet) override
STDMETHOD() QueryService(REFGUID guidService, REFIID riid, void **ppvObject) override
CMenuToolbarBase * m_popupBar
STDMETHOD() GetSite(REFIID riid, PVOID *ppvSite) override
STDMETHOD() ShowDW(BOOL fShow) override
STDMETHOD() TranslateAcceleratorIO(LPMSG lpMsg) override
HRESULT _DisableMouseTrack(BOOL bDisable)
CComPtr< IMenuPopup > m_subMenuChild
HRESULT _KillPopupTimers()
STDMETHOD() GetTop(THIS) override
HRESULT _MenuItemSelect(DWORD changeType)
HRESULT _MenuBarMouseUp(HWND hwnd, INT item, BOOL isLButton)
STDMETHOD() GetParentSite(THIS) override
CComPtr< IOleWindow > m_site
HRESULT _SetParentBand(CMenuBand *parent)
STDMETHOD() SetToolbar(THIS) override
STDMETHOD() SetTheme(THIS) override
STDMETHOD() ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override
CComPtr< CMenuBand > m_childBand
STDMETHOD() GetClassID(CLSID *pClassID) override
CComPtr< CMenuBand > m_parentBand
HRESULT _CancelCurrentPopup()
STDMETHOD() SetSite(IUnknown *pUnkSite) override
HRESULT _CallCBWithItemId(UINT Id, UINT uMsg, WPARAM wParam, LPARAM lParam)
STDMETHOD() SetNoBorder(THIS) override
STDMETHOD() OnPosRectChangeDB(RECT *prc) override
STDMETHOD() CloseDW(DWORD dwReserved) override
CComPtr< IShellMenuCallback > m_psmc
STDMETHOD() GetMenu(HMENU *phmenu, HWND *phwnd, DWORD *pdwFlags) override
HRESULT _KeyboardItemChange(DWORD change)
STDMETHOD() GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) override
HRESULT _ChangeHotItem(CMenuToolbarBase *tb, INT id, DWORD dwFlags)
HRESULT _CallCB(UINT uMsg, WPARAM wParam, LPARAM lParam, UINT id=0, LPITEMIDLIST pidl=NULL)
STDMETHOD() ContextSensitiveHelp(BOOL fEnterMode) override
STDMETHOD() SetShellFolder(IShellFolder *psf, LPCITEMIDLIST pidlFolder, HKEY hKey, DWORD dwFlags) override
STDMETHOD() SetSubMenu(IMenuPopup *pmp, BOOL fSet) override
STDMETHOD() IsEmpty(THIS) override
STDMETHOD() Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override
HRESULT _SetChildBand(CMenuBand *child)
STDMETHOD() SetMenu(HMENU hmenu, HWND hwnd, DWORD dwFlags) override
HRESULT AdjustForTheme(BOOL bFlatStyle)
CComPtr< IMenuPopup > m_subMenuParent
STDMETHOD() GetShellFolder(DWORD *pdwFlags, LPITEMIDLIST *ppidl, REFIID riid, void **ppv) override
STDMETHOD() GetBottom(THIS) override
HRESULT _MenuBarMouseDown(HWND hwnd, INT item, BOOL isLButton)
STDMETHOD() GetTracked(THIS) override
STDMETHOD() Save(IStream *pStm, BOOL fClearDirty) override
STDMETHOD() GetClient(IUnknown **ppunkClient) override
STDMETHOD() GetState(LPSMDATA psmd) override
CMenuToolbarBase * m_hotBar
CMenuStaticToolbar * m_staticToolbar
STDMETHOD() GetWindow(HWND *phwnd) override
STDMETHOD() IsMenuMessage(MSG *pmsg) override
HRESULT _ChangePopupItem(CMenuToolbarBase *tb, INT id)
STDMETHOD() Load(IStream *pStm) override
STDMETHOD() GetMenuInfo(IShellMenuCallback **ppsmc, UINT *puId, UINT *puIdAncestor, DWORD *pdwFlags) override
STDMETHOD() SetMenuToolbar(IUnknown *punk, DWORD dwFlags) override
STDMETHOD() IsDirty() override
HRESULT _BeforeCancelPopup()
#define FAILED_UNEXPECTEDLY(hr)
HRESULT WINAPI IUnknown_QueryServiceExec(IUnknown *lpUnknown, REFIID service, const GUID *group, DWORD cmdId, DWORD cmdOpt, VARIANT *pIn, VARIANT *pOut)
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
HRESULT WINAPI IUnknown_SetSite(IUnknown *obj, IUnknown *site)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLenum const GLfloat * params
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
void WINAPI ILFree(LPITEMIDLIST pidl)
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
TW_UINT32 TW_UINT16 TW_UINT16 MSG
DWORD WINAPI GetLastError(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
BOOL WINAPI IsWindow(_In_opt_ HWND)
HMENU WINAPI CreatePopupMenu(void)
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
struct tagTPMPARAMS TPMPARAMS
#define MAKEINTRESOURCEA(i)
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define SystemParametersInfo
SHORT WINAPI GetKeyState(_In_ int)
#define IID_PPV_ARG(Itype, ppType)