ReactOS 0.4.16-dev-91-g764881a
CBandSiteMenu.h
Go to the documentation of this file.
1/*
2 * Band site menu
3 *
4 * Copyright 2007 Hervé Poussineua
5 * Copyright 2009 Andrew Hill
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#pragma once
23
24// oddly, this class also responds to QueryInterface for CLSID_BandSiteMenu by returning the vtable at offset 0
26 public CComCoClass<CBandSiteMenu, &CLSID_BandSiteMenu>,
27 public CComObjectRootEx<CComMultiThreadModelNoCS>,
28 public IContextMenu3,
29 public IShellService
30{
31 CComPtr<IBandSite> m_BandSite;
34 CComHeapPtr<ITEMIDLIST> m_DesktopPidl;
35 CComHeapPtr<ITEMIDLIST> m_QLaunchPidl;
36
41 HRESULT _AddISFBandToMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, IUnknown* pBand, DWORD dwBandID, UINT *newMenuId);
47
48public:
52
53 // *** IShellService methods ***
54 STDMETHOD(SetOwner)(IUnknown *) override;
55
56 // *** IContextMenu methods ***
57 STDMETHOD(QueryContextMenu)(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override;
59 STDMETHOD(GetCommandString)(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax) override;
60
61 // *** IContextMenu2 methods ***
63
64 // *** IContextMenu3 methods ***
65 STDMETHOD(HandleMenuMsg2)(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult) override;
66
69
71
73 COM_INTERFACE_ENTRY_IID(IID_IShellService, IShellService)
74 COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2)
75 COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu)
77};
UINT cchMax
#define STDMETHOD(m)
Definition: basetyps.h:62
CComHeapPtr< ITEMIDLIST > m_DesktopPidl
Definition: CBandSiteMenu.h:34
STDMETHOD() HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) override
CSimpleArray< GUID > m_ComCatGuids
Definition: CBandSiteMenu.h:32
HRESULT _AddISFBandToMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, IUnknown *pBand, DWORD dwBandID, UINT *newMenuId)
UINT _GetMenuIdFromBand(CLSID *BandCLSID)
UINT _GetBandIdFromClsid(CLSID *pclsid)
CComPtr< IBandSite > m_BandSite
Definition: CBandSiteMenu.h:31
HRESULT _CreateMenuPart()
UINT _GetMenuIdFromISFBand(IUnknown *pBand)
STDMETHOD() InvokeCommand(LPCMINVOKECOMMANDINFO lpici) override
HRESULT _ShowToolbarError(HRESULT hRet)
HRESULT WINAPI FinalConstruct()
HRESULT _CreateNewISFBand(HWND hwnd, REFIID riid, void **ppv)
CComHeapPtr< ITEMIDLIST > m_QLaunchPidl
Definition: CBandSiteMenu.h:35
STDMETHOD() SetOwner(IUnknown *) override
LPITEMIDLIST _GetQLaunchPidl(BOOL refresh)
STDMETHOD() GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax) override
STDMETHOD() QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override
UINT _GetBandIdForBuiltinISFBand(UINT uID)
STDMETHOD() HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult) override
HRESULT _CreateBuiltInISFBand(UINT uID, REFIID riid, void **ppv)
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
UINT uFlags
Definition: api.c:59
#define IDR_BANDSITEMENU
Definition: resource.h:96
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:601
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:679
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:651
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:645
#define END_COM_MAP()
Definition: atlcom.h:592
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned int UINT
Definition: ndis.h:50
#define REFIID
Definition: guiddef.h:118
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
static HMENU hmenu
Definition: win.c:66
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
char * LPSTR
Definition: xmlstorage.h:182