ReactOS 0.4.15-dev-8116-gf69e256
CMenuBand Class Reference

#include <CMenuBand.h>

Inheritance diagram for CMenuBand:
Collaboration diagram for CMenuBand:

Public Member Functions

 CMenuBand ()
 
virtual ~CMenuBand ()
 
STDMETHOD() GetBandInfo (DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) override
 
STDMETHOD() ShowDW (BOOL fShow) override
 
STDMETHOD() CloseDW (DWORD dwReserved) override
 
STDMETHOD() ResizeBorderDW (LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override
 
STDMETHOD() GetWindow (HWND *phwnd) override
 
STDMETHOD() ContextSensitiveHelp (BOOL fEnterMode) override
 
STDMETHOD() SetSite (IUnknown *pUnkSite) override
 
STDMETHOD() GetSite (REFIID riid, PVOID *ppvSite) override
 
STDMETHOD() UIActivateIO (BOOL fActivate, LPMSG lpMsg) override
 
STDMETHOD() HasFocusIO () override
 
STDMETHOD() TranslateAcceleratorIO (LPMSG lpMsg) override
 
STDMETHOD() IsDirty () override
 
STDMETHOD() Load (IStream *pStm) override
 
STDMETHOD() Save (IStream *pStm, BOOL fClearDirty) override
 
STDMETHOD() GetSizeMax (ULARGE_INTEGER *pcbSize) override
 
STDMETHOD() GetClassID (CLSID *pClassID) override
 
STDMETHOD() QueryStatus (const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) override
 
STDMETHOD() Exec (const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override
 
STDMETHOD() QueryService (REFGUID guidService, REFIID riid, void **ppvObject) override
 
STDMETHOD() Popup (POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags) override
 
STDMETHOD() OnSelect (DWORD dwSelectType) override
 
STDMETHOD() SetSubMenu (IMenuPopup *pmp, BOOL fSet) override
 
STDMETHOD() SetClient (IUnknown *punkClient) override
 
STDMETHOD() GetClient (IUnknown **ppunkClient) override
 
STDMETHOD() OnPosRectChangeDB (RECT *prc) override
 
STDMETHOD() IsMenuMessage (MSG *pmsg) override
 
STDMETHOD() TranslateMenuMessage (MSG *pmsg, LRESULT *plRet) override
 
STDMETHOD() Initialize (IShellMenuCallback *psmc, UINT uId, UINT uIdAncestor, DWORD dwFlags) override
 
STDMETHOD() GetMenuInfo (IShellMenuCallback **ppsmc, UINT *puId, UINT *puIdAncestor, DWORD *pdwFlags) override
 
STDMETHOD() SetShellFolder (IShellFolder *psf, LPCITEMIDLIST pidlFolder, HKEY hKey, DWORD dwFlags) override
 
STDMETHOD() GetShellFolder (DWORD *pdwFlags, LPITEMIDLIST *ppidl, REFIID riid, void **ppv) override
 
STDMETHOD() SetMenu (HMENU hmenu, HWND hwnd, DWORD dwFlags) override
 
STDMETHOD() GetMenu (HMENU *phmenu, HWND *phwnd, DWORD *pdwFlags) override
 
STDMETHOD() InvalidateItem (LPSMDATA psmd, DWORD dwFlags) override
 
STDMETHOD() GetState (LPSMDATA psmd) override
 
STDMETHOD() SetMenuToolbar (IUnknown *punk, DWORD dwFlags) override
 
STDMETHOD() OnWinEvent (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override
 
STDMETHOD() IsWindowOwner (HWND hWnd) override
 
STDMETHOD() GetSubMenu (THIS) override
 
STDMETHOD() SetToolbar (THIS) override
 
STDMETHOD() SetMinWidth (THIS) override
 
STDMETHOD() SetNoBorder (THIS) override
 
STDMETHOD() SetTheme (THIS) override
 
STDMETHOD() GetTop (THIS) override
 
STDMETHOD() GetBottom (THIS) override
 
STDMETHOD() GetTracked (THIS) override
 
STDMETHOD() GetParentSite (THIS) override
 
STDMETHOD() GetState (THIS) override
 
STDMETHOD() DoDefaultAction (THIS) override
 
STDMETHOD() IsEmpty (THIS) override
 
HRESULT _CallCBWithItemId (UINT Id, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HRESULT _CallCBWithItemPidl (LPITEMIDLIST pidl, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HRESULT _TrackSubMenu (HMENU popup, INT x, INT y, RECT &rcExclude)
 
HRESULT _TrackContextMenu (IContextMenu *popup, INT x, INT y)
 
HRESULT _GetTopLevelWindow (HWND *topLevel)
 
HRESULT _ChangeHotItem (CMenuToolbarBase *tb, INT id, DWORD dwFlags)
 
HRESULT _ChangePopupItem (CMenuToolbarBase *tb, INT id)
 
HRESULT _MenuItemSelect (DWORD changeType)
 
HRESULT _CancelCurrentPopup ()
 
HRESULT _OnPopupSubMenu (IShellMenu *childShellMenu, POINTL *pAt, RECTL *pExclude, BOOL mouseInitiated)
 
HRESULT _BeforeCancelPopup ()
 
HRESULT _DisableMouseTrack (BOOL bDisable)
 
HRESULT _SetChildBand (CMenuBand *child)
 
HRESULT _SetParentBand (CMenuBand *parent)
 
HRESULT _IsPopup ()
 
HRESULT _IsTracking ()
 
HRESULT _KillPopupTimers ()
 
HRESULT _MenuBarMouseDown (HWND hwnd, INT item, BOOL isLButton)
 
HRESULT _MenuBarMouseUp (HWND hwnd, INT item, BOOL isLButton)
 
HRESULT _HasSubMenu ()
 
HRESULT AdjustForTheme (BOOL bFlatStyle)
 
BOOL UseBigIcons ()
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
HRESULT GetBandInfo ([in] DWORD dwBandID, [in] DWORD dwViewMode, [in, out] DESKBANDINFO *pdbi)
 
HRESULT ShowDW ([in] BOOL fShow)
 
HRESULT CloseDW ([in] DWORD dwReserved)
 
HRESULT ResizeBorderDW ([in] LPCRECT prcBorder, [in] IUnknown *punkToolbarSite, [in] BOOL fReserved)
 
HRESULT GetWindow ([out] HWND *phwnd)
 
HRESULT ContextSensitiveHelp ([in] BOOL fEnterMode)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
HRESULT SetSite ([in] IUnknown *pUnkSite)
 
HRESULT GetSite ([in] REFIID riid, [out, iid_is(riid)] PVOID *ppvSite)
 
HRESULT IsDirty ()
 
HRESULT Load ([in, unique] IStream *pStm)
 
HRESULT Save ([in, unique] IStream *pStm, [in] BOOL fClearDirty)
 
HRESULT GetSizeMax ([out] ULARGE_INTEGER *pcbSize)
 
HRESULT GetClassID ([out] CLSID *pClassID)
 
HRESULT QueryStatus ([in, unique] const GUID *pguidCmdGroup, [in] ULONG cCmds, [in, out, size_is(cCmds)] OLECMD prgCmds[], [in, out, unique] OLECMDTEXT *pCmdText)
 
HRESULT Exec ([in, unique] const GUID *pguidCmdGroup, [in] DWORD nCmdID, [in] DWORD nCmdexecopt, [in, unique] VARIANT *pvaIn, [in, out, unique] VARIANT *pvaOut)
 
- Public Member Functions inherited from IServiceProvider
HRESULT QueryService ([in] REFGUID guidService, [in] REFIID riid, [out] void **ppvObject)
 
HRESULT RemoteQueryService ([in] REFGUID guidService, [in] REFIID riid, [out, iid_is(riid)] IUnknown **ppvObject)
 
HRESULT Popup ([in] POINTL *ppt, [in] RECTL *prcExclude, [in] MP_POPUPFLAGS dwFlags)
 
HRESULT OnSelect ([in] DWORD dwSelectType)
 
HRESULT SetSubMenu ([in] IMenuPopup *pmp, [in] BOOL fSet)
 
HRESULT SetClient ([in] IUnknown *punkClient)
 
HRESULT GetClient ([out] IUnknown **ppunkClient)
 
HRESULT OnPosRectChangeDB ([in] RECT *prc)
 
HRESULT IsMenuMessage ([in] MSG *pmsg)
 
HRESULT TranslateMenuMessage ([in, out] MSG *pmsg, [out] LRESULT *plRet)
 

Private Member Functions

HRESULT _KeyboardItemChange (DWORD change)
 
HRESULT _CallCB (UINT uMsg, WPARAM wParam, LPARAM lParam, UINT id=0, LPITEMIDLIST pidl=NULL)
 

Private Attributes

CMenuFocusManagerm_focusManager
 
CMenuStaticToolbarm_staticToolbar
 
CMenuSFToolbarm_SFToolbar
 
CComPtr< IOleWindowm_site
 
CComPtr< IShellMenuCallbackm_psmc
 
CComPtr< IMenuPopupm_subMenuChild
 
CComPtr< IMenuPopupm_subMenuParent
 
CComPtr< CMenuBandm_childBand
 
CComPtr< CMenuBandm_parentBand
 
UINT m_uId
 
UINT m_uIdAncestor
 
DWORD m_dwFlags
 
PVOID m_UserData
 
HMENU m_hmenu
 
HWND m_menuOwner
 
BOOL m_useBigIcons
 
HWND m_topLevelWindow
 
CMenuToolbarBasem_hotBar
 
INT m_hotItem
 
CMenuToolbarBasem_popupBar
 
INT m_popupItem
 
BOOL m_Show
 
BOOL m_shellBottom
 
HMENU m_trackedPopup
 
HWND m_trackedHwnd
 

Additional Inherited Members

- Public Types inherited from IOleWindow
typedef IOleWindowLPOLEWINDOW
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IObjectWithSite
typedef IObjectWithSiteLPOBJECTWITHSITE
 
- Public Types inherited from IPersistStream
typedef IPersistStreamLPPERSISTSTREAM
 
- Public Types inherited from IPersist
typedef IPersistLPPERSIST
 
- Public Types inherited from IOleCommandTarget
enum  OLECMDF {
  OLECMDF_SUPPORTED = 0x1 , OLECMDF_ENABLED = 0x2 , OLECMDF_LATCHED = 0x4 , OLECMDF_NINCHED = 0x8 ,
  OLECMDF_INVISIBLE = 0x10 , OLECMDF_DEFHIDEONCTXTMENU = 0x20
}
 
enum  OLECMDTEXTF { OLECMDTEXTF_NONE = 0 , OLECMDTEXTF_NAME = 1 , OLECMDTEXTF_STATUS = 2 }
 
enum  OLECMDEXECOPT { OLECMDEXECOPT_DODEFAULT = 0 , OLECMDEXECOPT_PROMPTUSER = 1 , OLECMDEXECOPT_DONTPROMPTUSER = 2 , OLECMDEXECOPT_SHOWHELP = 3 }
 
enum  OLECMDID {
  OLECMDID_OPEN = 1 , OLECMDID_NEW = 2 , OLECMDID_SAVE = 3 , OLECMDID_SAVEAS = 4 ,
  OLECMDID_SAVECOPYAS = 5 , OLECMDID_PRINT = 6 , OLECMDID_PRINTPREVIEW = 7 , OLECMDID_PAGESETUP = 8 ,
  OLECMDID_SPELL = 9 , OLECMDID_PROPERTIES = 10 , OLECMDID_CUT = 11 , OLECMDID_COPY = 12 ,
  OLECMDID_PASTE = 13 , OLECMDID_PASTESPECIAL = 14 , OLECMDID_UNDO = 15 , OLECMDID_REDO = 16 ,
  OLECMDID_SELECTALL = 17 , OLECMDID_CLEARSELECTION = 18 , OLECMDID_ZOOM = 19 , OLECMDID_GETZOOMRANGE = 20 ,
  OLECMDID_UPDATECOMMANDS = 21 , OLECMDID_REFRESH = 22 , OLECMDID_STOP = 23 , OLECMDID_HIDETOOLBARS = 24 ,
  OLECMDID_SETPROGRESSMAX = 25 , OLECMDID_SETPROGRESSPOS = 26 , OLECMDID_SETPROGRESSTEXT = 27 , OLECMDID_SETTITLE = 28 ,
  OLECMDID_SETDOWNLOADSTATE = 29 , OLECMDID_STOPDOWNLOAD = 30 , OLECMDID_ONTOOLBARACTIVATED = 31 , OLECMDID_FIND = 32 ,
  OLECMDID_DELETE = 33 , OLECMDID_HTTPEQUIV = 34 , OLECMDID_HTTPEQUIV_DONE = 35 , OLECMDID_ENABLE_INTERACTION = 36 ,
  OLECMDID_ONUNLOAD = 37 , OLECMDID_PROPERTYBAG2 = 38 , OLECMDID_PREREFRESH = 39 , OLECMDID_SHOWSCRIPTERROR = 40 ,
  OLECMDID_SHOWMESSAGE = 41 , OLECMDID_SHOWFIND = 42 , OLECMDID_SHOWPAGESETUP = 43 , OLECMDID_SHOWPRINT = 44 ,
  OLECMDID_CLOSE = 45 , OLECMDID_ALLOWUILESSSAVEAS = 46 , OLECMDID_DONTDOWNLOADCSS = 47 , OLECMDID_UPDATEPAGESTATUS = 48 ,
  OLECMDID_PRINT2 = 49 , OLECMDID_PRINTPREVIEW2 = 50 , OLECMDID_SETPRINTTEMPLATE = 51 , OLECMDID_GETPRINTTEMPLATE = 52 ,
  OLECMDID_PAGEACTIONBLOCKED = 55 , OLECMDID_PAGEACTIONUIQUERY = 56 , OLECMDID_FOCUSVIEWCONTROLS = 57 , OLECMDID_FOCUSVIEWCONTROLSQUERY = 58 ,
  OLECMDID_SHOWPAGEACTIONMENU = 59 , OLECMDID_ADDTRAVELENTRY = 60 , OLECMDID_UPDATETRAVELENTRY = 61 , OLECMDID_UPDATEBACKFORWARDSTATE = 62 ,
  OLECMDID_OPTICAL_ZOOM = 63 , OLECMDID_OPTICAL_GETZOOMRANGE = 64 , OLECMDID_WINDOWSTATECHANGED = 65 , OLECMDID_ACTIVEXINSTALLSCOPE = 66 ,
  OLECMDID_UPDATETRAVELENTRY_DATARECOVERY = 67 , OLECMDID_SHOWTASKDLG = 68 , OLECMDID_POPSTATEEVENT = 69 , OLECMDID_VIEWPORT_MODE = 70 ,
  OLECMDID_LAYOUT_VIEWPORT_WIDTH = 71 , OLECMDID_VISUAL_VIEWPORT_EXCLUDE_BOTTOM = 72 , OLECMDID_USER_OPTICAL_ZOOM = 73 , OLECMDID_PAGEAVAILABLE = 74 ,
  OLECMDID_GETUSERSCALABLE = 75 , OLECMDID_UPDATE_CARET = 76 , OLECMDID_ENABLE_VISIBILITY = 77 , OLECMDID_MEDIA_PLAYBACK = 78
}
 
typedef IOleCommandTargetLPOLECOMMANDTARGET
 
typedef enum IOleCommandTarget::OLECMDF OLECMDF
 
typedef struct IOleCommandTarget::_tagOLECMD OLECMD
 
typedef struct IOleCommandTarget::_tagOLECMDTEXT OLECMDTEXT
 
typedef enum IOleCommandTarget::OLECMDTEXTF OLECMDTEXTF
 
typedef enum IOleCommandTarget::OLECMDEXECOPT OLECMDEXECOPT
 
typedef enum IOleCommandTarget::OLECMDID OLECMDID
 
- Public Types inherited from IServiceProvider
typedef IServiceProviderLPSERVICEPROVIDER
 
- Public Types inherited from IMenuPopup
enum  tagMENUPOPUPSELECT {
  MPOS_EXECUTE = 0 , MPOS_FULLCANCEL , MPOS_CANCELLEVEL , MPOS_SELECTLEFT ,
  MPOS_SELECTRIGHT , MPOS_CHILDTRACKING
}
 
enum  tagMENUPOPUPPOPUPFLAGS {
  MPPF_SETFOCUS = 0x00000001 , MPPF_INITIALSELECT = 0x00000002 , MPPF_NOANIMATE = 0x00000004 , MPPF_KEYBOARD = 0x00000010 ,
  MPPF_REPOSITION = 0x00000020 , MPPF_FORCEZORDER = 0x00000040 , MPPF_FINALSELECT = 0x00000080 , MPPF_TOP = 0x20000000 ,
  MPPF_LEFT = 0x40000000 , MPPF_RIGHT = 0x60000000 , MPPF_BOTTOM = 0x80000000 , MPPF_POS_MASK = 0xE0000000 ,
  MPPF_ALIGN_LEFT = 0x02000000 , MPPF_ALIGN_RIGHT = 0x04000000
}
 
typedef int MP_POPUPFLAGS
 
- Public Types inherited from IMenuBand
enum  tagMENUBANDHANDLERCID { MBHANDCID_PIDLSELECT = 0 }
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Detailed Description

Definition at line 27 of file CMenuBand.h.

Constructor & Destructor Documentation

◆ CMenuBand()

CMenuBand::CMenuBand ( )

Definition at line 35 of file CMenuBand.cpp.

35 :
38 m_site(NULL),
39 m_psmc(NULL),
49 m_hotItem(-1),
51 m_popupItem(-1),
56{
58}
HWND m_trackedHwnd
Definition: CMenuBand.h:73
CMenuSFToolbar * m_SFToolbar
Definition: CMenuBand.h:45
CMenuFocusManager * m_focusManager
Definition: CMenuBand.h:43
CMenuToolbarBase * m_popupBar
Definition: CMenuBand.h:66
CComPtr< IMenuPopup > m_subMenuChild
Definition: CMenuBand.h:49
HWND m_menuOwner
Definition: CMenuBand.h:59
CComPtr< IOleWindow > m_site
Definition: CMenuBand.h:47
BOOL m_Show
Definition: CMenuBand.h:69
CComPtr< CMenuBand > m_childBand
Definition: CMenuBand.h:51
CComPtr< CMenuBand > m_parentBand
Definition: CMenuBand.h:52
HMENU m_trackedPopup
Definition: CMenuBand.h:72
CComPtr< IShellMenuCallback > m_psmc
Definition: CMenuBand.h:48
HMENU m_hmenu
Definition: CMenuBand.h:58
INT m_hotItem
Definition: CMenuBand.h:65
HWND m_topLevelWindow
Definition: CMenuBand.h:62
CComPtr< IMenuPopup > m_subMenuParent
Definition: CMenuBand.h:50
INT m_popupItem
Definition: CMenuBand.h:67
CMenuToolbarBase * m_hotBar
Definition: CMenuBand.h:64
CMenuStaticToolbar * m_staticToolbar
Definition: CMenuBand.h:44
BOOL m_shellBottom
Definition: CMenuBand.h:70
BOOL m_useBigIcons
Definition: CMenuBand.h:61
static CMenuFocusManager * AcquireManager()
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117

◆ ~CMenuBand()

CMenuBand::~CMenuBand ( )
virtual

Definition at line 60 of file CMenuBand.cpp.

61{
63
64 delete m_staticToolbar;
65 delete m_SFToolbar;
66
67 if (m_hmenu)
69}
static void ReleaseManager(CMenuFocusManager *obj)
BOOL WINAPI DestroyMenu(_In_ HMENU)

Member Function Documentation

◆ _BeforeCancelPopup()

HRESULT CMenuBand::_BeforeCancelPopup ( )

Definition at line 1100 of file CMenuBand.cpp.

1101{
1102 if (m_staticToolbar)
1104 if (m_SFToolbar)
1106 return S_OK;
1107}
HRESULT BeforeCancelPopup()
#define S_OK
Definition: intsafe.h:52

Referenced by CMenuFocusManager::MsgFilterHook().

◆ _CallCB()

HRESULT CMenuBand::_CallCB ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
UINT  id = 0,
LPITEMIDLIST  pidl = NULL 
)
private

Definition at line 778 of file CMenuBand.cpp.

779{
780 if (!m_psmc)
781 return S_FALSE;
782
783 SMDATA smData = { 0 };
784 smData.punk = static_cast<IShellMenu2*>(this);
785 smData.uId = id;
786 smData.uIdParent = m_uId;
787 smData.uIdAncestor = m_uIdAncestor;
788 smData.pidlItem = pidl;
790 smData.hmenu = m_hmenu;
791 if (m_SFToolbar)
793 HRESULT hr = m_psmc->CallbackSM(&smData, uMsg, wParam, lParam);
794 ILFree(smData.pidlFolder);
795 if (smData.psf)
796 smData.psf->Release();
797 return hr;
798}
UINT m_uIdAncestor
Definition: CMenuBand.h:55
UINT m_uId
Definition: CMenuBand.h:54
HRESULT GetShellFolder(DWORD *pdwFlags, LPITEMIDLIST *ppidl, REFIID riid, void **ppv)
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
GLuint id
Definition: glext.h:5910
ULONG Release()
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:938
HRESULT hr
Definition: shlfolder.c:183
PIDLIST_ABSOLUTE pidlFolder
Definition: shobjidl.idl:2676
IUnknown * punk
Definition: shobjidl.idl:2675
PUITEMID_CHILD pidlItem
Definition: shobjidl.idl:2677
UINT uIdAncestor
Definition: shobjidl.idl:2674
HMENU hmenu
Definition: shobjidl.idl:2670
IShellFolder * psf
Definition: shobjidl.idl:2678
UINT uIdParent
Definition: shobjidl.idl:2673
#define S_FALSE
Definition: winerror.h:2357
#define IID_PPV_ARG(Itype, ppType)

Referenced by _CallCBWithItemId(), _CallCBWithItemPidl(), Initialize(), and ShowDW().

◆ _CallCBWithItemId()

HRESULT CMenuBand::_CallCBWithItemId ( UINT  Id,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 768 of file CMenuBand.cpp.

769{
770 return _CallCB(uMsg, wParam, lParam, id);
771}
HRESULT _CallCB(UINT uMsg, WPARAM wParam, LPARAM lParam, UINT id=0, LPITEMIDLIST pidl=NULL)
Definition: CMenuBand.cpp:778

Referenced by CMenuStaticToolbar::FillToolbar(), CMenuStaticToolbar::InternalContextMenu(), CMenuStaticToolbar::InternalExecuteItem(), and CMenuStaticToolbar::InternalPopupItem().

◆ _CallCBWithItemPidl()

HRESULT CMenuBand::_CallCBWithItemPidl ( LPITEMIDLIST  pidl,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 773 of file CMenuBand.cpp.

774{
775 return _CallCB(uMsg, wParam, lParam, 0, pidl);
776}

Referenced by CMenuSFToolbar::FillToolbar(), and CMenuSFToolbar::InternalExecuteItem().

◆ _CancelCurrentPopup()

HRESULT CMenuBand::_CancelCurrentPopup ( )

Definition at line 1037 of file CMenuBand.cpp.

1038{
1039 if (m_subMenuChild)
1040 {
1042 return hr;
1043 }
1044
1045 if (m_trackedPopup)
1046 {
1048 return S_OK;
1049 }
1050
1051 return S_FALSE;
1052}
@ MPOS_CANCELLEVEL
Definition: shobjidl.idl:2516
#define WM_CANCELMODE
Definition: winuser.h:1635
#define SendMessage
Definition: winuser.h:5843

Referenced by CMenuToolbarBase::CancelCurrentPopup(), and CMenuToolbarBase::TrackContextMenu().

◆ _ChangeHotItem()

HRESULT CMenuBand::_ChangeHotItem ( CMenuToolbarBase tb,
INT  id,
DWORD  dwFlags 
)

Definition at line 879 of file CMenuBand.cpp.

880{
881 if (m_hotBar == tb && m_hotItem == id)
882 return S_FALSE;
883
884 TRACE("Hot item changed from %p %p, to %p %p\n", m_hotBar, m_hotItem, tb, id);
885
887
888 m_hotBar = tb;
889 m_hotItem = id;
892
894
895 return S_OK;
896}
HRESULT _KillPopupTimers()
Definition: CMenuBand.cpp:1118
HRESULT _MenuItemSelect(DWORD changeType)
Definition: CMenuBand.cpp:953
HRESULT ChangeHotItem(CMenuToolbarBase *toolbar, INT item, DWORD dwFlags)
@ MPOS_CHILDTRACKING
Definition: shobjidl.idl:2519
static const WCHAR tb[]
Definition: suminfo.c:285
#define TRACE(s)
Definition: solgame.cpp:4
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

Referenced by CMenuToolbarBase::ChangeTrackedItem(), CMenuToolbarBase::KeyboardItemChange(), CMenuToolbarBase::PopupItem(), and CMenuFocusManager::ProcessMouseMove().

◆ _ChangePopupItem()

HRESULT CMenuBand::_ChangePopupItem ( CMenuToolbarBase tb,
INT  id 
)

Definition at line 898 of file CMenuBand.cpp.

899{
900 TRACE("Popup item changed from %p %p, to %p %p\n", m_popupBar, m_popupItem, tb, id);
901
902 m_popupBar = tb;
903 m_popupItem = id;
906
907 return S_OK;
908}
HRESULT ChangePopupItem(CMenuToolbarBase *toolbar, INT item)

Referenced by _SetChildBand(), and CMenuToolbarBase::PopupSubMenu().

◆ _DisableMouseTrack()

HRESULT CMenuBand::_DisableMouseTrack ( BOOL  bDisable)

Definition at line 1109 of file CMenuBand.cpp.

1110{
1111 if (m_staticToolbar)
1113 if (m_SFToolbar)
1114 m_SFToolbar->DisableMouseTrack(bDisable);
1115 return S_OK;
1116}
HRESULT DisableMouseTrack(BOOL bDisable)

Referenced by _TrackSubMenu().

◆ _GetTopLevelWindow()

HRESULT CMenuBand::_GetTopLevelWindow ( HWND topLevel)

Definition at line 873 of file CMenuBand.cpp.

874{
875 *topLevel = m_topLevelWindow;
876 return S_OK;
877}

Referenced by CMenuToolbarBase::KeyboardItemChange(), CMenuToolbarBase::OnCustomDraw(), and CMenuFocusManager::UpdateFocus().

◆ _HasSubMenu()

HRESULT CMenuBand::_HasSubMenu ( )

Definition at line 1150 of file CMenuBand.cpp.

1151{
1152 return m_popupBar ? S_OK : S_FALSE;
1153}

◆ _IsPopup()

HRESULT CMenuBand::_IsPopup ( )

Definition at line 620 of file CMenuBand.cpp.

621{
622 return !(m_dwFlags & SMINIT_VERTICAL);
623}
DWORD m_dwFlags
Definition: CMenuBand.h:56

Referenced by ShowDW(), and TranslateMenuMessage().

◆ _IsTracking()

HRESULT CMenuBand::_IsTracking ( )

Definition at line 625 of file CMenuBand.cpp.

626{
627 return m_popupBar != NULL;
628}

◆ _KeyboardItemChange()

HRESULT CMenuBand::_KeyboardItemChange ( DWORD  change)
private

Definition at line 910 of file CMenuBand.cpp.

911{
912 HRESULT hr;
914
915 if (!tb)
916 {
917 // If no hot item was selected choose the appropriate toolbar
918 if (change == VK_UP || change == VK_END)
919 {
920 if (m_staticToolbar)
922 else
923 tb = m_SFToolbar;
924 }
925 else if (change == VK_DOWN || change == VK_HOME)
926 {
927 if (m_SFToolbar)
928 tb = m_SFToolbar;
929 else
931 }
932 }
933
934 // Ask the first toolbar to change
935 hr = tb->KeyboardItemChange(change);
936
937 if (hr != S_FALSE)
938 return hr;
939
940 // Select the second toolbar based on the first
943 else if (m_SFToolbar)
944 tb = m_SFToolbar;
945
946 if (!tb)
947 return hr;
948
949 // Ask the second toolbar to change
950 return tb->KeyboardItemChange(change == VK_DOWN ? VK_HOME : VK_END);
951}
#define VK_UP
Definition: winuser.h:2225
#define VK_END
Definition: winuser.h:2222
#define VK_HOME
Definition: winuser.h:2223
#define VK_DOWN
Definition: winuser.h:2227

Referenced by _MenuItemSelect(), and Exec().

◆ _KillPopupTimers()

HRESULT CMenuBand::_KillPopupTimers ( )

Definition at line 1118 of file CMenuBand.cpp.

1119{
1120 HRESULT hr = S_OK;
1121 if (m_staticToolbar)
1123 if (FAILED(hr))
1124 return hr;
1125
1126 if (m_SFToolbar)
1128
1129 return hr;
1130}
HRESULT KillPopupTimer()
#define FAILED(hr)
Definition: intsafe.h:51

Referenced by _ChangeHotItem(), CMenuToolbarBase::PrepareExecuteItem(), and CMenuToolbarBase::TrackContextMenu().

◆ _MenuBarMouseDown()

HRESULT CMenuBand::_MenuBarMouseDown ( HWND  hwnd,
INT  item,
BOOL  isLButton 
)

Definition at line 1132 of file CMenuBand.cpp.

1133{
1137 m_SFToolbar->MenuBarMouseDown(item, isLButton);
1138 return S_OK;
1139}
HRESULT IsWindowOwner(HWND hwnd)
HRESULT MenuBarMouseDown(INT iIndex, BOOL isLButton)
static ATOM item
Definition: dde.c:856
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

◆ _MenuBarMouseUp()

HRESULT CMenuBand::_MenuBarMouseUp ( HWND  hwnd,
INT  item,
BOOL  isLButton 
)

Definition at line 1141 of file CMenuBand.cpp.

1142{
1144 m_staticToolbar->MenuBarMouseUp(item, isLButton);
1146 m_SFToolbar->MenuBarMouseUp(item, isLButton);
1147 return S_OK;
1148}
HRESULT MenuBarMouseUp(INT iIndex, BOOL isLButton)

◆ _MenuItemSelect()

HRESULT CMenuBand::_MenuItemSelect ( DWORD  changeType)

Definition at line 953 of file CMenuBand.cpp.

954{
955 // Needed to prevent the this point from vanishing mid-function
956 CComPtr<CMenuBand> safeThis = this;
957 HRESULT hr;
958
959 if (m_dwFlags & SMINIT_VERTICAL)
960 {
961 switch (changeType)
962 {
963 case VK_UP:
964 case VK_DOWN:
965 return _KeyboardItemChange(changeType);
966
967 // TODO: Left/Right across multi-column menus, if they ever work.
968 case VK_LEFT:
969 changeType = MPOS_SELECTLEFT;
970 break;
971 case VK_RIGHT:
972 changeType = MPOS_SELECTRIGHT;
973 break;
974 }
975 }
976 else
977 {
978 // In horizontal menubars, left/right are equivalent to vertical's up/down
979 switch (changeType)
980 {
981 case VK_LEFT:
983 if (hr != S_FALSE)
984 return hr;
985 case VK_RIGHT:
987 if (hr != S_FALSE)
988 return hr;
989 }
990 }
991
992 // In this context, the parent is the CMenuDeskBar, so when it bubbles upward,
993 // it is notifying the deskbar, and not the the higher-level menu.
994 // Same for the child: since it points to a CMenuDeskBar, it's not just recursing.
995 switch (changeType)
996 {
997 case MPOS_EXECUTE:
998 {
1000 int item = m_hotItem;
1001 tb->PrepareExecuteItem(item);
1002 if (m_subMenuParent)
1003 {
1004 m_subMenuParent->OnSelect(changeType);
1005 }
1006 TRACE("Menu closed, executing item...\n");
1007 tb->ExecuteItem();
1008 break;
1009 }
1010 case MPOS_SELECTLEFT:
1011 if (m_parentBand && m_parentBand->_IsPopup()==S_FALSE)
1012 return m_parentBand->_MenuItemSelect(VK_LEFT);
1013 if (m_subMenuChild)
1014 return m_subMenuChild->OnSelect(MPOS_CANCELLEVEL);
1015 if (!m_subMenuParent)
1016 return S_OK;
1017 return m_subMenuParent->OnSelect(MPOS_CANCELLEVEL);
1018
1019 case MPOS_SELECTRIGHT:
1020 if (m_hotBar && m_hotItem >= 0 && m_hotBar->PopupItem(m_hotItem, TRUE) == S_OK)
1021 return S_FALSE;
1022 if (m_parentBand)
1023 return m_parentBand->_MenuItemSelect(VK_RIGHT);
1024 if (!m_subMenuParent)
1025 return S_OK;
1026 return m_subMenuParent->OnSelect(MPOS_SELECTRIGHT);
1027
1028 default:
1029 if (!m_subMenuParent)
1030 return S_OK;
1031 return m_subMenuParent->OnSelect(changeType);
1032 }
1033
1034 return S_OK;
1035}
HRESULT _KeyboardItemChange(DWORD change)
Definition: CMenuBand.cpp:910
HRESULT PopupItem(INT iItem, BOOL keyInitiated)
#define TRUE
Definition: types.h:120
@ MPOS_SELECTRIGHT
Definition: shobjidl.idl:2518
#define VK_LEFT
Definition: winuser.h:2224
#define VK_RIGHT
Definition: winuser.h:2226

Referenced by _ChangeHotItem(), _TrackContextMenu(), CMenuFocusManager::GetMsgHook(), CMenuFocusManager::MsgFilterHook(), and CMenuToolbarBase::ProcessClick().

◆ _OnPopupSubMenu()

HRESULT CMenuBand::_OnPopupSubMenu ( IShellMenu childShellMenu,
POINTL pAt,
RECTL pExclude,
BOOL  mouseInitiated 
)

Definition at line 1054 of file CMenuBand.cpp.

1055{
1056 HRESULT hr = 0;
1057 CComPtr<IBandSite> pBandSite;
1058 CComPtr<IDeskBar> pDeskBar;
1059
1060 // Create the necessary objects
1063 return hr;
1064
1067 return hr;
1068
1069 hr = pDeskBar->SetClient(pBandSite);
1071 return hr;
1072
1073 hr = pBandSite->AddBand(childShellMenu);
1075 return hr;
1076
1077 //
1078 CComPtr<IMenuPopup> popup;
1079 hr = pDeskBar->QueryInterface(IID_PPV_ARG(IMenuPopup, &popup));
1081 return hr;
1082
1083 m_subMenuChild = popup;
1084
1085 if (m_subMenuParent)
1087 else
1088 IUnknown_SetSite(popup, m_site);
1089
1091
1092 if (keyInitiated && m_dwFlags & SMINIT_VERTICAL)
1094
1095 popup->Popup(pAt, pExclude, flags);
1096
1097 return S_OK;
1098}
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
HRESULT WINAPI IUnknown_SetSite(IUnknown *obj, IUnknown *site)
Definition: ordinal.c:1407
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
@ MPPF_INITIALSELECT
Definition: shobjidl.idl:2525
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define CMenuSite_CreateInstance
Definition: shellmenu.h:87
#define CMenuDeskBar_CreateInstance
Definition: shellmenu.h:75

Referenced by CMenuToolbarBase::PopupSubMenu().

◆ _SetChildBand()

HRESULT CMenuBand::_SetChildBand ( CMenuBand child)

Definition at line 603 of file CMenuBand.cpp.

604{
606 if (!child)
607 {
609 }
610 return S_OK;
611}
HRESULT _ChangePopupItem(CMenuToolbarBase *tb, INT id)
Definition: CMenuBand.cpp:898
static HWND child
Definition: cursoricon.c:298

Referenced by CMenuFocusManager::PopMenuBar(), CMenuFocusManager::PopMenuPopup(), and CMenuFocusManager::PushMenuPopup().

◆ _SetParentBand()

HRESULT CMenuBand::_SetParentBand ( CMenuBand parent)

Definition at line 614 of file CMenuBand.cpp.

615{
617 return S_OK;
618}
r parent
Definition: btrfs.c:3010

Referenced by CMenuFocusManager::PushMenuPopup().

◆ _TrackContextMenu()

HRESULT CMenuBand::_TrackContextMenu ( IContextMenu popup,
INT  x,
INT  y 
)

Definition at line 821 of file CMenuBand.cpp.

822{
823 HRESULT hr;
824 UINT uCommand;
825
826 // Ensure that the menu doesn't disappear on us
827 CComPtr<IContextMenu> ctxMenu = contextMenu;
828
829 HMENU popup = CreatePopupMenu();
830
831 if (popup == NULL)
832 return E_FAIL;
833
834 TRACE("Before Query\n");
835 const INT idCmdFirst = 100;
836 hr = contextMenu->QueryContextMenu(popup, 0, idCmdFirst, UINT_MAX, CMF_NORMAL);
838 {
839 TRACE("Query failed\n");
840 DestroyMenu(popup);
841 return hr;
842 }
843
845
847
848 TRACE("Before Tracking\n");
849 uCommand = ::TrackPopupMenuEx(popup, TPM_RETURNCMD, x, y, hwnd, NULL);
850
852
853 if (uCommand != 0)
854 {
856
857 TRACE("Before InvokeCommand\n");
858 CMINVOKECOMMANDINFO cmi = { sizeof(cmi), 0, hwnd };
859 cmi.lpVerb = MAKEINTRESOURCEA(uCommand - idCmdFirst);
860 hr = contextMenu->InvokeCommand(&cmi);
861 TRACE("InvokeCommand returned hr=%08x\n", hr);
862 }
863 else
864 {
865 TRACE("TrackPopupMenu failed. Code=%d, LastError=%d\n", uCommand, GetLastError());
866 hr = S_FALSE;
867 }
868
869 DestroyMenu(popup);
870 return hr;
871}
HRESULT PushTrackedPopup(HMENU popup)
HRESULT PopTrackedPopup(HMENU popup)
#define E_FAIL
Definition: ddrawi.h:102
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define UINT_MAX
Definition: limits.h:41
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
unsigned int UINT
Definition: ndis.h:50
int32_t INT
Definition: typedefs.h:58
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:838
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
#define TPM_RETURNCMD
Definition: winuser.h:2387

Referenced by CMenuToolbarBase::TrackContextMenu().

◆ _TrackSubMenu()

HRESULT CMenuBand::_TrackSubMenu ( HMENU  popup,
INT  x,
INT  y,
RECT rcExclude 
)

Definition at line 800 of file CMenuBand.cpp.

801{
802 TPMPARAMS params = { sizeof(TPMPARAMS), rcExclude };
803 UINT flags = TPM_VERPOSANIMATION | TPM_VERTICAL | TPM_LEFTALIGN;
805
806 m_trackedPopup = popup;
808
810 ::TrackPopupMenuEx(popup, flags, x, y, hwnd, &params);
812
815
817
818 return S_OK;
819}
HRESULT _DisableMouseTrack(BOOL bDisable)
Definition: CMenuBand.cpp:1109
GLenum const GLfloat * params
Definition: glext.h:5645
#define TPM_LEFTALIGN
Definition: winuser.h:2377
struct tagTPMPARAMS TPMPARAMS
#define TPM_VERTICAL
Definition: winuser.h:2382

Referenced by CMenuToolbarBase::PopupSubMenu().

◆ AdjustForTheme()

HRESULT CMenuBand::AdjustForTheme ( BOOL  bFlatStyle)

Definition at line 1155 of file CMenuBand.cpp.

1156{
1157 return IUnknown_QueryServiceExec(m_site, SID_SMenuPopup, &CGID_MenuDeskBar, 4, bFlatStyle, NULL, NULL);
1158}
HRESULT WINAPI IUnknown_QueryServiceExec(IUnknown *lpUnknown, REFIID service, const GUID *group, DWORD cmdId, DWORD cmdOpt, VARIANT *pIn, VARIANT *pOut)
Definition: ordinal.c:1549

Referenced by CMenuToolbarBase::CreateToolbar(), and OnWinEvent().

◆ CloseDW()

HRESULT STDMETHODCALLTYPE CMenuBand::CloseDW ( DWORD  dwReserved)
override

Implements IDockingWindow.

Definition at line 443 of file CMenuBand.cpp.

444{
445 if (m_subMenuChild)
446 {
448 }
449
450 if (m_subMenuChild)
451 {
452 TRACE("Child object should have removed itself.\n");
453 }
454
455 ShowDW(FALSE);
456
457 if (m_staticToolbar != NULL)
458 {
460 }
461
462 if (m_SFToolbar != NULL)
463 {
465 }
466
467 if (m_site) m_site.Release();
470 if (m_childBand) m_childBand.Release();
471 if (m_parentBand) m_parentBand.Release();
472
473 return S_OK;
474}
void Release()
Definition: atlcomcli.h:170
STDMETHOD() ShowDW(BOOL fShow) override
Definition: CMenuBand.cpp:391

◆ ContextSensitiveHelp()

HRESULT STDMETHODCALLTYPE CMenuBand::ContextSensitiveHelp ( BOOL  fEnterMode)
override

Implements IOleWindow.

Definition at line 1184 of file CMenuBand.cpp.

1185{
1187 return S_OK;
1188}
#define UNIMPLEMENTED
Definition: debug.h:118

◆ DoDefaultAction()

HRESULT STDMETHODCALLTYPE CMenuBand::DoDefaultAction ( THIS  )
override

Definition at line 1250 of file CMenuBand.cpp.

1251{
1253 return S_OK;
1254}

◆ Exec()

HRESULT STDMETHODCALLTYPE CMenuBand::Exec ( const GUID pguidCmdGroup,
DWORD  nCmdID,
DWORD  nCmdexecopt,
VARIANT pvaIn,
VARIANT pvaOut 
)
override

Implements IOleCommandTarget.

Definition at line 506 of file CMenuBand.cpp.

507{
508 if (!pguidCmdGroup)
509 return E_FAIL;
510
511 if (IsEqualGUID(*pguidCmdGroup, CLSID_MenuBand))
512 {
513 if (nCmdID == 16) // set (big) icon size
514 {
515 this->m_useBigIcons = nCmdexecopt == 2;
516 return S_OK;
517 }
518 else if (nCmdID == 19) // popup-related
519 {
520 return S_FALSE;
521 }
522 else if (nCmdID == 5) // select an item
523 {
524 if (nCmdexecopt == 0) // first
525 {
527 }
528 else // last
529 {
531 }
532 return S_FALSE;
533 }
534
535 return S_FALSE;
536 }
537
539 return S_OK;
540}
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147

◆ GetBandInfo()

HRESULT STDMETHODCALLTYPE CMenuBand::GetBandInfo ( DWORD  dwBandID,
DWORD  dwViewMode,
DESKBANDINFO pdbi 
)
override

Implements IDeskBand.

Definition at line 342 of file CMenuBand.cpp.

346{
347 SIZE minStatic = { 0 };
348 SIZE minShlFld = { 0 };
349 SIZE maxStatic = { 0 };
350 SIZE maxShlFld = { 0 };
351 SIZE intStatic = { 0 };
352 SIZE intShlFld = { 0 };
353
354 HRESULT hr = S_OK;
355
356 if (m_staticToolbar != NULL)
357 hr = m_staticToolbar->GetSizes(&minStatic, &maxStatic, &intStatic);
359 return hr;
360
361 if (m_SFToolbar != NULL)
362 hr = m_SFToolbar->GetSizes(&minShlFld, &maxShlFld, &intShlFld);
364 return hr;
365
367 return E_FAIL;
368
369 if (m_dwFlags & SMINIT_VERTICAL)
370 {
371 pdbi->ptMinSize.x = max(minStatic.cx, minShlFld.cx) + 20;
372 pdbi->ptMinSize.y = minStatic.cy + minShlFld.cy;
373 pdbi->ptMaxSize.x = max(maxStatic.cx, maxShlFld.cx) + 20;
374 pdbi->ptMaxSize.y = maxStatic.cy + maxShlFld.cy;
375 pdbi->dwModeFlags = DBIMF_VARIABLEHEIGHT;
376 }
377 else
378 {
379 pdbi->ptMinSize.x = minStatic.cx + minShlFld.cx;
380 pdbi->ptMinSize.y = max(minStatic.cy, minShlFld.cy);
381 pdbi->ptMaxSize.x = maxStatic.cx + maxShlFld.cx;
382 pdbi->ptMaxSize.y = max(maxStatic.cy, maxShlFld.cy);
383 }
384 pdbi->ptIntegral.x = max(intStatic.cx, intShlFld.cx);
385 pdbi->ptIntegral.y = max(intStatic.cy, intShlFld.cy);
386 pdbi->ptActual = pdbi->ptMinSize;
387
388 return S_OK;
389}
HRESULT GetSizes(SIZE *pMinSize, SIZE *pMaxSize, SIZE *pIntegralSize)
LONG y
Definition: windef.h:330
LONG x
Definition: windef.h:329
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
#define max(a, b)
Definition: svc.c:63

◆ GetBottom()

HRESULT STDMETHODCALLTYPE CMenuBand::GetBottom ( THIS  )
override

Definition at line 1226 of file CMenuBand.cpp.

1227{
1229 return S_OK;
1230}

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CMenuBand::GetClassID ( CLSID pClassID)
override

Implements IPersist.

Definition at line 1299 of file CMenuBand.cpp.

1300{
1302 return S_OK;
1303}

◆ GetClient()

HRESULT STDMETHODCALLTYPE CMenuBand::GetClient ( IUnknown **  ppunkClient)
override

Implements IDeskBar.

Definition at line 650 of file CMenuBand.cpp.

651{
652 if (!ppunkClient)
653 return E_POINTER;
654 *ppunkClient = NULL;
655
656 if (m_subMenuChild)
657 {
658 *ppunkClient = m_subMenuChild;
659 (*ppunkClient)->AddRef();
660 }
661
662 return S_OK;
663}
#define E_POINTER
Definition: winerror.h:2365

◆ GetMenu()

HRESULT STDMETHODCALLTYPE CMenuBand::GetMenu ( HMENU phmenu,
HWND phwnd,
DWORD pdwFlags 
)
override

Definition at line 176 of file CMenuBand.cpp.

180{
181 if (m_staticToolbar == NULL)
182 return E_FAIL;
183
184 return m_staticToolbar->GetMenu(phmenu, phwnd, pdwFlags);
185}
HRESULT GetMenu(HMENU *phmenu, HWND *phwnd, DWORD *pdwFlags)

◆ GetMenuInfo()

HRESULT STDMETHODCALLTYPE CMenuBand::GetMenuInfo ( IShellMenuCallback **  ppsmc,
UINT puId,
UINT puIdAncestor,
DWORD pdwFlags 
)
override

Definition at line 91 of file CMenuBand.cpp.

96{
97 if (!pdwFlags) // maybe?
98 return E_INVALIDARG;
99
100 if (ppsmc)
101 {
102 *ppsmc = m_psmc;
103 if (*ppsmc)
104 (*ppsmc)->AddRef();
105 }
106
107 if (puId)
108 *puId = m_uId;
109
110 if (puIdAncestor)
111 *puIdAncestor = m_uIdAncestor;
112
113 *pdwFlags = m_dwFlags;
114
115 return S_OK;
116}
#define E_INVALIDARG
Definition: ddrawi.h:101

Referenced by CMenuSFToolbar::InternalPopupItem().

◆ GetParentSite()

HRESULT STDMETHODCALLTYPE CMenuBand::GetParentSite ( THIS  )
override

Definition at line 1238 of file CMenuBand.cpp.

1239{
1241 return S_OK;
1242}

◆ GetShellFolder()

HRESULT STDMETHODCALLTYPE CMenuBand::GetShellFolder ( DWORD pdwFlags,
LPITEMIDLIST ppidl,
REFIID  riid,
void **  ppv 
)
override

Definition at line 717 of file CMenuBand.cpp.

718{
719 if (m_SFToolbar)
720 return m_SFToolbar->GetShellFolder(pdwFlags, ppidl, riid, ppv);
721 return E_FAIL;
722}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ GetSite()

HRESULT STDMETHODCALLTYPE CMenuBand::GetSite ( REFIID  riid,
PVOID ppvSite 
)
override

Implements IObjectWithSite.

Definition at line 251 of file CMenuBand.cpp.

252{
253 if (m_site == NULL)
254 return E_FAIL;
255
256 return m_site->QueryInterface(riid, ppvSite);
257}

Referenced by CMenuFocusManager::UpdateFocus().

◆ GetSizeMax()

HRESULT STDMETHODCALLTYPE CMenuBand::GetSizeMax ( ULARGE_INTEGER pcbSize)
override

Implements IPersistStream.

Definition at line 1293 of file CMenuBand.cpp.

1294{
1296 return S_OK;
1297}

◆ GetState() [1/2]

HRESULT STDMETHODCALLTYPE CMenuBand::GetState ( LPSMDATA  psmd)
override

Definition at line 1166 of file CMenuBand.cpp.

1167{
1169 return S_OK;
1170}

◆ GetState() [2/2]

HRESULT STDMETHODCALLTYPE CMenuBand::GetState ( THIS  )
override

Definition at line 1244 of file CMenuBand.cpp.

1245{
1247 return S_OK;
1248}

◆ GetSubMenu()

HRESULT STDMETHODCALLTYPE CMenuBand::GetSubMenu ( THIS  )
override

Definition at line 1190 of file CMenuBand.cpp.

1191{
1193 return S_OK;
1194}

◆ GetTop()

HRESULT STDMETHODCALLTYPE CMenuBand::GetTop ( THIS  )
override

Definition at line 1220 of file CMenuBand.cpp.

1221{
1223 return S_OK;
1224}

◆ GetTracked()

HRESULT STDMETHODCALLTYPE CMenuBand::GetTracked ( THIS  )
override

Definition at line 1232 of file CMenuBand.cpp.

1233{
1235 return S_OK;
1236}

◆ GetWindow()

HRESULT STDMETHODCALLTYPE CMenuBand::GetWindow ( HWND phwnd)
override

Implements IOleWindow.

Definition at line 259 of file CMenuBand.cpp.

260{
261 if (m_SFToolbar != NULL)
262 return m_SFToolbar->GetWindow(phwnd);
263
264 if (m_staticToolbar != NULL)
265 return m_staticToolbar->GetWindow(phwnd);
266
267 if (phwnd) *phwnd = NULL;
268
269 return E_FAIL;
270}
HRESULT GetWindow(HWND *phwnd)

◆ HasFocusIO()

HRESULT STDMETHODCALLTYPE CMenuBand::HasFocusIO ( )
override

Definition at line 1262 of file CMenuBand.cpp.

1263{
1264 if (m_popupBar)
1265 return S_OK;
1266 return S_FALSE;
1267}

◆ Initialize()

HRESULT STDMETHODCALLTYPE CMenuBand::Initialize ( IShellMenuCallback psmc,
UINT  uId,
UINT  uIdAncestor,
DWORD  dwFlags 
)
override

Definition at line 71 of file CMenuBand.cpp.

76{
77 if (m_psmc != psmc)
78 m_psmc = psmc;
79 m_uId = uId;
80 m_uIdAncestor = uIdAncestor;
82
83 if (m_psmc)
84 {
85 _CallCB(SMC_CREATE, 0, reinterpret_cast<LPARAM>(&m_UserData));
86 }
87
88 return S_OK;
89}
PVOID m_UserData
Definition: CMenuBand.h:57
LONG_PTR LPARAM
Definition: windef.h:208

◆ InvalidateItem()

HRESULT STDMETHODCALLTYPE CMenuBand::InvalidateItem ( LPSMDATA  psmd,
DWORD  dwFlags 
)
override

Definition at line 1160 of file CMenuBand.cpp.

1161{
1163 return S_OK;
1164}

◆ IsDirty()

HRESULT STDMETHODCALLTYPE CMenuBand::IsDirty ( void  )
override

Implements IPersistStream.

Definition at line 1275 of file CMenuBand.cpp.

1276{
1278 return S_OK;
1279}

◆ IsEmpty()

HRESULT STDMETHODCALLTYPE CMenuBand::IsEmpty ( THIS  )
override

Definition at line 1256 of file CMenuBand.cpp.

1257{
1259 return S_OK;
1260}

◆ IsMenuMessage()

HRESULT STDMETHODCALLTYPE CMenuBand::IsMenuMessage ( MSG pmsg)
override

Implements IMenuBand.

Definition at line 665 of file CMenuBand.cpp.

666{
667 return S_FALSE;
668}

◆ IsWindowOwner()

HRESULT STDMETHODCALLTYPE CMenuBand::IsWindowOwner ( HWND  hWnd)
override

Definition at line 757 of file CMenuBand.cpp.

758{
760 return S_OK;
761
763 return S_OK;
764
765 return S_FALSE;
766}
HWND hWnd
Definition: settings.c:17

Referenced by CMenuFocusManager::GetMsgHook(), and CMenuFocusManager::MsgFilterHook().

◆ Load()

HRESULT STDMETHODCALLTYPE CMenuBand::Load ( IStream pStm)
override

Implements IPersistStream.

Definition at line 1281 of file CMenuBand.cpp.

1282{
1284 return S_OK;
1285}

◆ OnPosRectChangeDB()

HRESULT STDMETHODCALLTYPE CMenuBand::OnPosRectChangeDB ( RECT prc)
override

Implements IDeskBar.

Definition at line 272 of file CMenuBand.cpp.

273{
274 SIZE maxStatic = { 0 };
275 SIZE maxShlFld = { 0 };
276 HRESULT hr = S_OK;
277
278 if (m_staticToolbar != NULL)
279 hr = m_staticToolbar->GetSizes(NULL, &maxStatic, NULL);
281 return hr;
282
283 if (m_SFToolbar != NULL)
284 hr = m_SFToolbar->GetSizes(NULL, &maxShlFld, NULL);
286 return hr;
287
289 return E_FAIL;
290
291 int sy = min(prc->bottom - prc->top, maxStatic.cy + maxShlFld.cy);
292
293 int syStatic = maxStatic.cy;
294 int syShlFld = sy - syStatic;
295
296 // TODO: Windows has a more complex system to decide ordering.
297 // Because we only support two toolbars at once, this is enough for us.
298 if (m_shellBottom)
299 {
300 // Static menu on top
301 if (m_SFToolbar)
302 {
304 prc->left,
305 prc->top + syStatic,
306 prc->right - prc->left,
307 syShlFld);
308 }
309 if (m_staticToolbar)
310 {
312 prc->left,
313 prc->top,
314 prc->right - prc->left,
315 syStatic);
316 }
317 }
318 else
319 {
320 // Folder menu on top
321 if (m_SFToolbar)
322 {
324 prc->left,
325 prc->top,
326 prc->right - prc->left,
327 syShlFld);
328 }
329 if (m_staticToolbar)
330 {
332 prc->left,
333 prc->top + syShlFld,
334 prc->right - prc->left,
335 syStatic);
336 }
337 }
338
339 return S_OK;
340}
HRESULT SetPosSize(int x, int y, int cx, int cy)
#define min(a, b)
Definition: monoChain.cc:55
_Out_ LPRECT prc
Definition: ntgdi.h:1658
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306

◆ OnSelect()

HRESULT STDMETHODCALLTYPE CMenuBand::OnSelect ( DWORD  dwSelectType)
override

Implements IMenuPopup.

Definition at line 558 of file CMenuBand.cpp.

559{
560 // When called from outside, this is straightforward:
561 // Things that a submenu needs to know, are spread down, and
562 // things that the parent needs to know, are spread up. No drama.
563 // The fun is in _MenuItemSelect (internal method).
564 switch (dwSelectType)
565 {
567 if (!m_subMenuParent)
568 break;
569 // TODO: Cancel timers?
570 return m_subMenuParent->OnSelect(dwSelectType);
571 case MPOS_SELECTLEFT:
572 if (m_subMenuChild)
574 if (!m_subMenuParent)
575 break;
576 return m_subMenuParent->OnSelect(dwSelectType);
577 case MPOS_SELECTRIGHT:
578 if (!m_subMenuParent)
579 break;
580 return m_subMenuParent->OnSelect(dwSelectType);
581 case MPOS_EXECUTE:
582 case MPOS_FULLCANCEL:
583 if (m_subMenuChild)
584 m_subMenuChild->OnSelect(dwSelectType);
585 if (!m_subMenuParent)
586 break;
587 return m_subMenuParent->OnSelect(dwSelectType);
588 case MPOS_CANCELLEVEL:
589 if (m_subMenuChild)
590 m_subMenuChild->OnSelect(dwSelectType);
591 break;
592 }
593 return S_FALSE;
594}

◆ OnWinEvent()

HRESULT STDMETHODCALLTYPE CMenuBand::OnWinEvent ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
LRESULT theResult 
)
override

Definition at line 724 of file CMenuBand.cpp.

725{
726 if (theResult)
727 *theResult = 0;
728
729 if (uMsg == WM_WININICHANGE && wParam == SPI_SETFLATMENU)
730 {
731 BOOL bFlatMenus;
732 SystemParametersInfo(SPI_GETFLATMENU, 0, &bFlatMenus, 0);
733 AdjustForTheme(bFlatMenus);
734
735 if (m_staticToolbar)
736 m_staticToolbar->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult);
737
738 if (m_SFToolbar)
739 m_SFToolbar->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult);
740
741 return S_OK;
742 }
743
745 {
746 return m_staticToolbar->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult);
747 }
748
750 {
751 return m_SFToolbar->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult);
752 }
753
754 return S_FALSE;
755}
HRESULT AdjustForTheme(BOOL bFlatStyle)
Definition: CMenuBand.cpp:1155
HRESULT OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
unsigned int BOOL
Definition: ntddk_ex.h:94
#define WM_WININICHANGE
Definition: winuser.h:1630
#define SystemParametersInfo
Definition: winuser.h:5858

◆ Popup()

HRESULT STDMETHODCALLTYPE CMenuBand::Popup ( POINTL ppt,
RECTL prcExclude,
MP_POPUPFLAGS  dwFlags 
)
override

Implements IMenuPopup.

Definition at line 552 of file CMenuBand.cpp.

553{
555 return S_OK;
556}

◆ QueryService()

HRESULT STDMETHODCALLTYPE CMenuBand::QueryService ( REFGUID  guidService,
REFIID  riid,
void **  ppvObject 
)
override

Implements IServiceProvider.

Definition at line 542 of file CMenuBand.cpp.

543{
544 if (IsEqualIID(guidService, SID_SMenuBandChild) ||
545 IsEqualIID(guidService, SID_SMenuBandBottom) ||
546 IsEqualIID(guidService, SID_SMenuBandBottomSelected))
547 return this->QueryInterface(riid, ppvObject);
548 WARN("Unknown service requested %s\n", wine_dbgstr_guid(&guidService));
549 return E_NOINTERFACE;
550}
#define WARN(fmt,...)
Definition: debug.h:115
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ QueryStatus()

HRESULT STDMETHODCALLTYPE CMenuBand::QueryStatus ( const GUID pguidCmdGroup,
ULONG  cCmds,
OLECMD  prgCmds[],
OLECMDTEXT pCmdText 
)
override

Implements IOleCommandTarget.

Definition at line 1305 of file CMenuBand.cpp.

1306{
1308 return S_OK;
1309}

◆ ResizeBorderDW()

HRESULT STDMETHODCALLTYPE CMenuBand::ResizeBorderDW ( LPCRECT  prcBorder,
IUnknown punkToolbarSite,
BOOL  fReserved 
)
override

Implements IDockingWindow.

Definition at line 1178 of file CMenuBand.cpp.

1179{
1181 return S_OK;
1182}

◆ Save()

HRESULT STDMETHODCALLTYPE CMenuBand::Save ( IStream pStm,
BOOL  fClearDirty 
)
override

Implements IPersistStream.

Definition at line 1287 of file CMenuBand.cpp.

1288{
1290 return S_OK;
1291}

◆ SetClient()

HRESULT STDMETHODCALLTYPE CMenuBand::SetClient ( IUnknown punkClient)
override

Implements IDeskBar.

Definition at line 630 of file CMenuBand.cpp.

631{
632 CComPtr<IMenuPopup> child = m_subMenuChild;
633
635
636 if (child)
637 {
639 child.Release();
640 }
641
642 if (!punkClient)
643 {
644 return S_OK;
645 }
646
648}
nsrefcnt Release()

◆ SetMenu()

HRESULT STDMETHODCALLTYPE CMenuBand::SetMenu ( HMENU  hmenu,
HWND  hwnd,
DWORD  dwFlags 
)
override

Definition at line 118 of file CMenuBand.cpp.

122{
123 HRESULT hr;
124
125 TRACE("CMenuBand::SetMenu called, hmenu=%p; hwnd=%p, flags=%x\n", hmenu, hwnd, dwFlags);
126
127 BOOL created = FALSE;
128
129 if (m_hmenu && m_hmenu != hmenu)
130 {
132 m_hmenu = NULL;
133 }
134
135 m_hmenu = hmenu;
137
138 if (m_hmenu && m_staticToolbar == NULL)
139 {
141 created = true;
142 }
143
144 if (m_staticToolbar)
145 {
148 return hr;
149 }
150
151 if (m_site)
152 {
154
155 hr = m_site->GetWindow(&hwndParent);
157 return hr;
158
159 if (created)
160 {
163 return hr;
164
166 }
167 else
168 {
170 }
171 }
172
173 return hr;
174}
HRESULT SetMenu(HMENU hmenu, HWND hwnd, DWORD dwFlags)
virtual HRESULT FillToolbar(BOOL clearFirst=FALSE) override
HRESULT CreateToolbar(HWND hwndParent, DWORD dwFlags)
static HWND hwndParent
Definition: cryptui.c:300
static HMENU hmenu
Definition: win.c:66

◆ SetMenuToolbar()

HRESULT STDMETHODCALLTYPE CMenuBand::SetMenuToolbar ( IUnknown punk,
DWORD  dwFlags 
)
override

Definition at line 1172 of file CMenuBand.cpp.

1173{
1175 return S_OK;
1176}

◆ SetMinWidth()

HRESULT STDMETHODCALLTYPE CMenuBand::SetMinWidth ( THIS  )
override

Definition at line 1202 of file CMenuBand.cpp.

1203{
1205 return S_OK;
1206}

◆ SetNoBorder()

HRESULT STDMETHODCALLTYPE CMenuBand::SetNoBorder ( THIS  )
override

Definition at line 1208 of file CMenuBand.cpp.

1209{
1211 return S_OK;
1212}

◆ SetShellFolder()

HRESULT STDMETHODCALLTYPE CMenuBand::SetShellFolder ( IShellFolder psf,
LPCITEMIDLIST  pidlFolder,
HKEY  hKey,
DWORD  dwFlags 
)
override

Definition at line 683 of file CMenuBand.cpp.

684{
685 if (!psf)
686 return E_INVALIDARG;
687
688 if (m_SFToolbar == NULL)
689 {
690 m_SFToolbar = new CMenuSFToolbar(this);
691 }
692
693 HRESULT hr = m_SFToolbar->SetShellFolder(psf, pidlFolder, hKey, dwFlags);
695 return hr;
696
697 m_shellBottom = (dwFlags & SMSET_BOTTOM) != 0;
698
699 if (m_site)
700 {
702
703 hr = m_site->GetWindow(&hwndParent);
705 return hr;
706
709 return hr;
710
712 }
713
714 return hr;
715}
HRESULT SetShellFolder(IShellFolder *psf, LPCITEMIDLIST pidlFolder, HKEY hKey, DWORD dwFlags)
virtual HRESULT FillToolbar(BOOL clearFirst=FALSE) override
FxAutoRegKey hKey

◆ SetSite()

HRESULT STDMETHODCALLTYPE CMenuBand::SetSite ( IUnknown pUnkSite)
override

Implements IObjectWithSite.

Definition at line 187 of file CMenuBand.cpp.

188{
190 HRESULT hr;
191
192 m_site = NULL;
193
194 if (pUnkSite == NULL)
195 return S_OK;
196
200 return hr;
201
202 hr = m_site->GetWindow(&hwndParent);
204 return hr;
205
207 return E_FAIL;
208
209 if (m_staticToolbar != NULL)
210 {
213 return hr;
214
217 return hr;
218 }
219
220 if (m_SFToolbar != NULL)
221 {
224 return hr;
225
228 return hr;
229 }
230
233 return hr;
234
235 CComPtr<IOleWindow> pTopLevelWindow;
236 hr = IUnknown_QueryService(m_site, SID_STopLevelBrowser, IID_PPV_ARG(IOleWindow, &pTopLevelWindow));
237 if (SUCCEEDED(hr))
238 {
239 hr = pTopLevelWindow->GetWindow(&m_topLevelWindow);
241 return hr;
242 }
243 else
244 {
246 }
247
248 return S_OK;
249}
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1497
#define SUCCEEDED(hr)
Definition: intsafe.h:50
BOOL WINAPI IsWindow(_In_opt_ HWND)

◆ SetSubMenu()

HRESULT STDMETHODCALLTYPE CMenuBand::SetSubMenu ( IMenuPopup pmp,
BOOL  fSet 
)
override

Implements IMenuPopup.

Definition at line 596 of file CMenuBand.cpp.

597{
599 return S_OK;
600}

◆ SetTheme()

HRESULT STDMETHODCALLTYPE CMenuBand::SetTheme ( THIS  )
override

Definition at line 1214 of file CMenuBand.cpp.

1215{
1217 return S_OK;
1218}

◆ SetToolbar()

HRESULT STDMETHODCALLTYPE CMenuBand::SetToolbar ( THIS  )
override

Definition at line 1196 of file CMenuBand.cpp.

1197{
1199 return S_OK;
1200}

◆ ShowDW()

HRESULT STDMETHODCALLTYPE CMenuBand::ShowDW ( BOOL  fShow)
override

Implements IDockingWindow.

Definition at line 391 of file CMenuBand.cpp.

392{
393 HRESULT hr = S_OK;
394
395 if (m_Show == fShow)
396 return S_OK;
397
398 m_Show = fShow;
399
400 if (m_staticToolbar != NULL)
401 {
402 hr = m_staticToolbar->ShowDW(fShow);
404 return hr;
405 }
406
407 if (m_SFToolbar != NULL)
408 {
409 hr = m_SFToolbar->ShowDW(fShow);
411 return hr;
412 }
413
414 if (fShow)
415 {
416 hr = _CallCB(SMC_INITMENU, 0, 0);
418 return hr;
419 }
420 else if (m_parentBand)
421 {
422 m_parentBand->SetClient(NULL);
423 }
424
425 if (_IsPopup() == S_OK)
426 {
427 if (fShow)
429 else
431 }
432 else
433 {
434 if (fShow)
436 else
438 }
439
440 return S_OK;
441}
HRESULT _IsPopup()
Definition: CMenuBand.cpp:620
HRESULT PopMenuPopup(CMenuBand *mb)
HRESULT PushMenuPopup(CMenuBand *mb)
HRESULT PopMenuBar(CMenuBand *mb)
HRESULT PushMenuBar(CMenuBand *mb)
HRESULT ShowDW(BOOL fShow)

Referenced by CloseDW().

◆ TranslateAcceleratorIO()

HRESULT STDMETHODCALLTYPE CMenuBand::TranslateAcceleratorIO ( LPMSG  lpMsg)
override

Definition at line 1269 of file CMenuBand.cpp.

1270{
1271 // TODO: Alt down -> toggle menu focus
1272 return S_FALSE;
1273}

◆ TranslateMenuMessage()

HRESULT STDMETHODCALLTYPE CMenuBand::TranslateMenuMessage ( MSG pmsg,
LRESULT plRet 
)
override

Implements IMenuBand.

Definition at line 670 of file CMenuBand.cpp.

671{
672 if (pmsg->message == WM_ACTIVATE && _IsPopup() == S_FALSE)
673 {
674 if (m_staticToolbar)
675 m_staticToolbar->Invalidate();
676 if (m_SFToolbar)
677 m_SFToolbar->Invalidate();
678 }
679
680 return S_FALSE;
681}
#define WM_ACTIVATE
Definition: winuser.h:1612

◆ UIActivateIO()

HRESULT STDMETHODCALLTYPE CMenuBand::UIActivateIO ( BOOL  fActivate,
LPMSG  lpMsg 
)
override

Definition at line 476 of file CMenuBand.cpp.

477{
478 HRESULT hr;
479
480 if (m_subMenuParent)
481 {
482 hr = m_subMenuParent->SetSubMenu(this, fActivate);
484 return hr;
485 }
486
487 if (fActivate)
488 {
489 CComPtr<IOleWindow> pTopLevelWindow;
490 hr = IUnknown_QueryService(m_site, SID_SMenuPopup, IID_PPV_ARG(IOleWindow, &pTopLevelWindow));
492 return hr;
493
494 hr = pTopLevelWindow->GetWindow(&m_topLevelWindow);
496 return hr;
497 }
498 else
499 {
501 }
502
503 return S_FALSE;
504}

◆ UseBigIcons()

BOOL CMenuBand::UseBigIcons ( )
inline

Definition at line 207 of file CMenuBand.h.

208 {
209 return m_useBigIcons;
210 }

Referenced by CMenuToolbarBase::UpdateImageLists().

Member Data Documentation

◆ m_childBand

CComPtr<CMenuBand> CMenuBand::m_childBand
private

Definition at line 51 of file CMenuBand.h.

Referenced by _SetChildBand(), and CloseDW().

◆ m_dwFlags

DWORD CMenuBand::m_dwFlags
private

◆ m_focusManager

CMenuFocusManager* CMenuBand::m_focusManager
private

Definition at line 43 of file CMenuBand.h.

Referenced by _TrackContextMenu(), _TrackSubMenu(), CMenuBand(), ShowDW(), and ~CMenuBand().

◆ m_hmenu

HMENU CMenuBand::m_hmenu
private

Definition at line 58 of file CMenuBand.h.

Referenced by _CallCB(), SetMenu(), and ~CMenuBand().

◆ m_hotBar

CMenuToolbarBase* CMenuBand::m_hotBar
private

Definition at line 64 of file CMenuBand.h.

Referenced by _ChangeHotItem(), _KeyboardItemChange(), and _MenuItemSelect().

◆ m_hotItem

INT CMenuBand::m_hotItem
private

Definition at line 65 of file CMenuBand.h.

Referenced by _ChangeHotItem(), and _MenuItemSelect().

◆ m_menuOwner

HWND CMenuBand::m_menuOwner
private

Definition at line 59 of file CMenuBand.h.

Referenced by _CallCB(), _TrackContextMenu(), _TrackSubMenu(), and SetMenu().

◆ m_parentBand

CComPtr<CMenuBand> CMenuBand::m_parentBand
private

Definition at line 52 of file CMenuBand.h.

Referenced by _MenuItemSelect(), _SetParentBand(), CloseDW(), and ShowDW().

◆ m_popupBar

CMenuToolbarBase* CMenuBand::m_popupBar
private

Definition at line 66 of file CMenuBand.h.

Referenced by _ChangePopupItem(), _HasSubMenu(), _IsTracking(), and HasFocusIO().

◆ m_popupItem

INT CMenuBand::m_popupItem
private

Definition at line 67 of file CMenuBand.h.

Referenced by _ChangePopupItem().

◆ m_psmc

CComPtr<IShellMenuCallback> CMenuBand::m_psmc
private

Definition at line 48 of file CMenuBand.h.

Referenced by _CallCB(), GetMenuInfo(), and Initialize().

◆ m_SFToolbar

◆ m_shellBottom

BOOL CMenuBand::m_shellBottom
private

Definition at line 70 of file CMenuBand.h.

Referenced by OnPosRectChangeDB(), and SetShellFolder().

◆ m_Show

BOOL CMenuBand::m_Show
private

Definition at line 69 of file CMenuBand.h.

Referenced by ShowDW().

◆ m_site

CComPtr<IOleWindow> CMenuBand::m_site
private

◆ m_staticToolbar

◆ m_subMenuChild

CComPtr<IMenuPopup> CMenuBand::m_subMenuChild
private

◆ m_subMenuParent

CComPtr<IMenuPopup> CMenuBand::m_subMenuParent
private

Definition at line 50 of file CMenuBand.h.

Referenced by _MenuItemSelect(), _OnPopupSubMenu(), CloseDW(), OnSelect(), SetSite(), and UIActivateIO().

◆ m_topLevelWindow

HWND CMenuBand::m_topLevelWindow
private

◆ m_trackedHwnd

HWND CMenuBand::m_trackedHwnd
private

Definition at line 73 of file CMenuBand.h.

Referenced by _CancelCurrentPopup(), and _TrackSubMenu().

◆ m_trackedPopup

HMENU CMenuBand::m_trackedPopup
private

Definition at line 72 of file CMenuBand.h.

Referenced by _CancelCurrentPopup(), and _TrackSubMenu().

◆ m_uId

UINT CMenuBand::m_uId
private

Definition at line 54 of file CMenuBand.h.

Referenced by _CallCB(), GetMenuInfo(), and Initialize().

◆ m_uIdAncestor

UINT CMenuBand::m_uIdAncestor
private

Definition at line 55 of file CMenuBand.h.

Referenced by _CallCB(), GetMenuInfo(), and Initialize().

◆ m_useBigIcons

BOOL CMenuBand::m_useBigIcons
private

Definition at line 61 of file CMenuBand.h.

Referenced by Exec(), and UseBigIcons().

◆ m_UserData

PVOID CMenuBand::m_UserData
private

Definition at line 57 of file CMenuBand.h.

Referenced by Initialize().


The documentation for this class was generated from the following files: