4 * Copyright 2007 Hervé Poussineua
5 * Copyright 2009 Andrew Hill
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.
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.
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
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
>,
35 // *** IShellService methods ***
36 virtual HRESULT STDMETHODCALLTYPE
SetOwner(IUnknown
*);
38 // *** IContextMenu methods ***
39 virtual HRESULT STDMETHODCALLTYPE
QueryContextMenu(HMENU hmenu
, UINT indexMenu
, UINT idCmdFirst
, UINT idCmdLast
, UINT uFlags
);
40 virtual HRESULT STDMETHODCALLTYPE
InvokeCommand(LPCMINVOKECOMMANDINFO lpici
);
41 virtual HRESULT STDMETHODCALLTYPE
GetCommandString(UINT_PTR idCmd
, UINT uType
, UINT
*pwReserved
, LPSTR pszName
, UINT cchMax
);
43 // *** IContextMenu2 methods ***
44 virtual HRESULT STDMETHODCALLTYPE
HandleMenuMsg(UINT uMsg
, WPARAM wParam
, LPARAM lParam
);
46 DECLARE_REGISTRY_RESOURCEID(IDR_BANDSITEMENU
)
47 DECLARE_NOT_AGGREGATABLE(CBandSiteMenu
)
49 DECLARE_PROTECT_FINAL_CONSTRUCT()
51 BEGIN_COM_MAP(CBandSiteMenu
)
52 COM_INTERFACE_ENTRY_IID(IID_IShellService
, IShellService
)
53 COM_INTERFACE_ENTRY_IID(IID_IContextMenu2
, IContextMenu2
)
54 COM_INTERFACE_ENTRY_IID(IID_IContextMenu
, IContextMenu
)