ReactOS  0.4.15-dev-2144-g2282205
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 
26 class 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:
45  COpenWithMenu();
47 
48  // IContextMenu
49  virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
51  virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen);
52 
53  // IContextMenu2
55 
56  // IShellExtInit
57  virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID);
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)
68  END_COM_MAP()
69 };
70 
71 #endif /* _SHE_OCMENU_H_ */
virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi)
WCHAR m_wszPath[MAX_PATH]
Definition: COpenWithMenu.h:36
static HICON
Definition: imagelist.c:84
virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
VOID AddApp(PVOID pApp)
HBITMAP IconToBitmap(HICON hIcon)
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:611
UINT_PTR WPARAM
Definition: windef.h:207
UINT uFlags
Definition: api.c:59
char * LPSTR
Definition: xmlstorage.h:182
WPARAM wParam
Definition: combotst.c:138
LONG_PTR LPARAM
Definition: windef.h:208
virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID)
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#define MAX_PATH
Definition: compat.h:34
#define WINAPI
Definition: msvc.h:6
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:605
virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam)
VOID AddChooseProgramItem()
HICON hIcon
Definition: msconfig.c:44
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
#define IDR_OPENWITHMENU
Definition: shresdef.h:859
unsigned int UINT
Definition: ndis.h:50
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:639
COpenWithList * m_pAppList
Definition: COpenWithMenu.h:38
static HBITMAP
Definition: button.c:44
#define END_COM_MAP()
Definition: atlcom.h:552
virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPARAM lParam
Definition: combotst.c:139