ReactOS 0.4.15-dev-8102-g108db8f
COpenWithMenu.h
Go to the documentation of this file.
1/*
2 * Open With Context Menu extension
3 *
4 * Copyright 2007 Johannes Anderwald <johannes.anderwald@reactos.org>
5 * Copyright 2009 Andrew Hill
6 * Copyright 2012 Rafal Harabien
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 */
22
23#ifndef _SHE_OCMENU_H_
24#define _SHE_OCMENU_H_
25
26class COpenWithList;
27
29 public CComCoClass<COpenWithMenu, &CLSID_OpenWithMenu>,
30 public CComObjectRootEx<CComMultiThreadModelNoCS>,
31 public IContextMenu2,
32 public IShellExtInit
33{
34 private:
39
42 VOID AddApp(PVOID pApp);
43
44 public:
47
48 // IContextMenu
49 STDMETHOD(QueryContextMenu)(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override;
51 STDMETHOD(GetCommandString)(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override;
52
53 // IContextMenu2
55
56 // IShellExtInit
57 STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) override;
58
61
63
65 COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2)
66 COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu)
67 COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit)
69};
70
71#endif /* _SHE_OCMENU_H_ */
#define STDMETHOD(m)
Definition: basetyps.h:62
COpenWithList * m_pAppList
Definition: COpenWithMenu.h:38
VOID AddChooseProgramItem()
STDMETHOD() GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override
HBITMAP IconToBitmap(HICON hIcon)
VOID AddApp(PVOID pApp)
WCHAR m_wszPath[MAX_PATH]
Definition: COpenWithMenu.h:36
STDMETHOD() QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override
STDMETHOD() HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) override
STDMETHOD() InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) override
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
UINT uFlags
Definition: api.c:59
#define MAX_PATH
Definition: compat.h:34
#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 HBITMAP
Definition: button.c:44
static HICON
Definition: imagelist.c:84
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
HICON hIcon
Definition: msconfig.c:44
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned int UINT
Definition: ndis.h:50
#define IDR_OPENWITHMENU
Definition: shresdef.h:898
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
static void Initialize()
Definition: xlate.c:212
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180