ReactOS
0.4.16-dev-334-g4d9f67c
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
28
class
COpenWithMenu
:
29
public
CComCoClass<COpenWithMenu, &CLSID_OpenWithMenu>,
30
public
CComObjectRootEx<CComMultiThreadModelNoCS>,
31
public
IContextMenu2
,
32
public
IShellExtInit
33
{
34
private
:
35
UINT
m_idCmdFirst
,
m_idCmdLast
;
36
WCHAR
m_wszPath
[
MAX_PATH
];
37
HMENU
m_hSubMenu
;
38
COpenWithList
*
m_pAppList
;
39
40
HBITMAP
IconToBitmap
(
HICON
hIcon
);
41
VOID
AddChooseProgramItem
();
42
VOID
AddApp
(
PVOID
pApp);
43
44
public
:
45
COpenWithMenu
();
46
~COpenWithMenu
();
47
48
// IContextMenu
49
STDMETHOD
(
QueryContextMenu
)(
HMENU
hMenu,
UINT
indexMenu,
UINT
idCmdFirst,
UINT
idCmdLast,
UINT
uFlags
)
override
;
50
STDMETHOD
(
InvokeCommand
)(
LPCMINVOKECOMMANDINFO
lpcmi)
override
;
51
STDMETHOD
(
GetCommandString
)(
UINT_PTR
idCommand,
UINT
uFlags
,
UINT
*lpReserved,
LPSTR
lpszName,
UINT
uMaxNameLen)
override
;
52
53
// IContextMenu2
54
STDMETHOD
(
HandleMenuMsg
)(
UINT
uMsg,
WPARAM
wParam
,
LPARAM
lParam
)
override
;
55
56
// IShellExtInit
57
STDMETHOD
(
Initialize
)(
PCIDLIST_ABSOLUTE
pidlFolder,
IDataObject
*pdtobj,
HKEY
hkeyProgID)
override
;
58
59
DECLARE_REGISTRY_RESOURCEID
(
IDR_OPENWITHMENU
)
60
DECLARE_NOT_AGGREGATABLE
(
COpenWithMenu
)
61
62
DECLARE_PROTECT_FINAL_CONSTRUCT
()
63
64
BEGIN_COM_MAP
(
COpenWithMenu
)
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_ */
STDMETHOD
#define STDMETHOD(m)
Definition:
basetyps.h:62
COpenWithList
Definition:
COpenWithMenu.cpp:35
COpenWithMenu
Definition:
COpenWithMenu.h:33
COpenWithMenu::m_pAppList
COpenWithList * m_pAppList
Definition:
COpenWithMenu.h:38
COpenWithMenu::m_hSubMenu
HMENU m_hSubMenu
Definition:
COpenWithMenu.h:37
COpenWithMenu::AddChooseProgramItem
VOID AddChooseProgramItem()
Definition:
COpenWithMenu.cpp:1199
COpenWithMenu::GetCommandString
STDMETHOD() GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override
Definition:
COpenWithMenu.cpp:1371
COpenWithMenu::IconToBitmap
HBITMAP IconToBitmap(HICON hIcon)
Definition:
COpenWithMenu.cpp:1176
COpenWithMenu::m_idCmdLast
UINT m_idCmdLast
Definition:
COpenWithMenu.h:35
COpenWithMenu::AddApp
VOID AddApp(PVOID pApp)
Definition:
COpenWithMenu.cpp:1227
COpenWithMenu::COpenWithMenu
COpenWithMenu()
Definition:
COpenWithMenu.cpp:1136
COpenWithMenu::m_wszPath
WCHAR m_wszPath[MAX_PATH]
Definition:
COpenWithMenu.h:36
COpenWithMenu::QueryContextMenu
STDMETHOD() QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override
Definition:
COpenWithMenu.cpp:1253
COpenWithMenu::HandleMenuMsg
STDMETHOD() HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) override
Definition:
COpenWithMenu.cpp:1380
COpenWithMenu::InvokeCommand
STDMETHOD() InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) override
Definition:
COpenWithMenu.cpp:1329
COpenWithMenu::m_idCmdFirst
UINT m_idCmdFirst
Definition:
COpenWithMenu.h:35
COpenWithMenu::~COpenWithMenu
~COpenWithMenu()
Definition:
COpenWithMenu.cpp:1143
wParam
WPARAM wParam
Definition:
combotst.c:138
lParam
LPARAM lParam
Definition:
combotst.c:139
uFlags
UINT uFlags
Definition:
api.c:59
MAX_PATH
#define MAX_PATH
Definition:
compat.h:34
IContextMenu2
Definition:
shobjidl.idl:1772
IContextMenu
Definition:
shobjidl.idl:1646
IDataObject
Definition:
objidl.idl:1530
IShellExtInit
Definition:
shobjidl.idl:1290
void
Definition:
nsiface.idl:2307
BEGIN_COM_MAP
#define BEGIN_COM_MAP(x)
Definition:
atlcom.h:581
COM_INTERFACE_ENTRY_IID
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition:
atlcom.h:601
DECLARE_PROTECT_FINAL_CONSTRUCT
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition:
atlcom.h:679
DECLARE_NOT_AGGREGATABLE
#define DECLARE_NOT_AGGREGATABLE(x)
Definition:
atlcom.h:651
DECLARE_REGISTRY_RESOURCEID
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition:
atlcom.h:645
END_COM_MAP
#define END_COM_MAP()
Definition:
atlcom.h:592
HBITMAP
static HBITMAP
Definition:
button.c:44
HICON
static HICON
Definition:
imagelist.c:80
HMENU
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition:
ordinal.c:63
hIcon
HICON hIcon
Definition:
msconfig.c:44
UINT_PTR
unsigned __int3264 UINT_PTR
Definition:
mstsclib_h.h:274
UINT
unsigned int UINT
Definition:
ndis.h:50
IDR_OPENWITHMENU
#define IDR_OPENWITHMENU
Definition:
shresdef.h:901
IContextMenu::tagCMINVOKECOMMANDINFO
Definition:
shobjidl.idl:1713
_ITEMIDLIST_ABSOLUTE
Definition:
shtypes.idl:46
LPARAM
LONG_PTR LPARAM
Definition:
windef.h:208
WPARAM
UINT_PTR WPARAM
Definition:
windef.h:207
Initialize
static void Initialize()
Definition:
xlate.c:212
LPSTR
char * LPSTR
Definition:
xmlstorage.h:182
WCHAR
__wchar_t WCHAR
Definition:
xmlstorage.h:180
dll
win32
shell32
COpenWithMenu.h
Generated on Mon Dec 9 2024 06:04:47 for ReactOS by
1.9.6