ReactOS
0.4.16-dev-2204-g370eb8c
CFontBackgroundMenu.h
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS Font Shell Extension
3
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4
* PURPOSE: Fonts folder shell extension background menu
5
* COPYRIGHT: Copyright 2026 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6
*/
7
8
#pragma once
9
10
class
CFontBackgroundMenu
11
:
public
CComObjectRootEx<CComMultiThreadModelNoCS>
12
,
public
IContextMenu3
13
{
14
HWND
m_hwnd
=
nullptr
;
15
CFontExt
*
m_pFontExt
=
nullptr
;
16
CComPtr<IShellFolder>
m_psf
;
17
CComPtr<IContextMenuCB>
m_pmcb
;
18
LPFNDFMCALLBACK
m_pfnmcb
=
nullptr
;
19
20
public
:
21
CFontBackgroundMenu
();
22
virtual
~CFontBackgroundMenu
();
23
HRESULT
WINAPI
Initialize
(
CFontExt
* pFontExt,
const
DEFCONTEXTMENU
*pdcm);
24
25
// IContextMenu
26
STDMETHODIMP
QueryContextMenu
(
HMENU
hMenu,
UINT
indexMenu,
UINT
idCmdFirst,
UINT
idCmdLast,
UINT
uFlags
)
override
;
27
STDMETHODIMP
InvokeCommand
(
LPCMINVOKECOMMANDINFO
lpcmi)
override
;
28
STDMETHODIMP
GetCommandString
(
UINT_PTR
idCommand,
UINT
uFlags
,
UINT
*
lpReserved
,
LPSTR
lpszName,
UINT
uMaxNameLen)
override
;
29
30
// IContextMenu2
31
STDMETHODIMP
HandleMenuMsg
(
UINT
uMsg,
WPARAM
wParam
,
LPARAM
lParam
)
override
;
32
33
// IContextMenu3
34
STDMETHODIMP
HandleMenuMsg2
(
UINT
uMsg,
WPARAM
wParam
,
LPARAM
lParam
,
LRESULT
*plResult)
override
;
35
36
BEGIN_COM_MAP
(
CFontBackgroundMenu
)
37
COM_INTERFACE_ENTRY_IID
(IID_IContextMenu,
IContextMenu
)
38
COM_INTERFACE_ENTRY_IID
(IID_IContextMenu2,
IContextMenu2
)
39
COM_INTERFACE_ENTRY_IID
(IID_IContextMenu3,
IContextMenu3
)
40
END_COM_MAP
()
41
};
STDMETHODIMP
#define STDMETHODIMP
Definition:
basetyps.h:43
CFontBackgroundMenu
Definition:
CFontBackgroundMenu.h:13
CFontBackgroundMenu::m_pmcb
CComPtr< IContextMenuCB > m_pmcb
Definition:
CFontBackgroundMenu.h:17
CFontBackgroundMenu::m_pfnmcb
LPFNDFMCALLBACK m_pfnmcb
Definition:
CFontBackgroundMenu.h:18
CFontBackgroundMenu::m_pFontExt
CFontExt * m_pFontExt
Definition:
CFontBackgroundMenu.h:15
CFontBackgroundMenu::~CFontBackgroundMenu
virtual ~CFontBackgroundMenu()
Definition:
CFontBackgroundMenu.cpp:17
CFontBackgroundMenu::HandleMenuMsg
STDMETHODIMP HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) override
Definition:
CFontBackgroundMenu.cpp:95
CFontBackgroundMenu::m_psf
CComPtr< IShellFolder > m_psf
Definition:
CFontBackgroundMenu.h:16
CFontBackgroundMenu::InvokeCommand
STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) override
Definition:
CFontBackgroundMenu.cpp:40
CFontBackgroundMenu::CFontBackgroundMenu
CFontBackgroundMenu()
Definition:
CFontBackgroundMenu.cpp:13
CFontBackgroundMenu::GetCommandString
STDMETHODIMP GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override
Definition:
CFontBackgroundMenu.cpp:83
CFontBackgroundMenu::HandleMenuMsg2
STDMETHODIMP HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult) override
Definition:
CFontBackgroundMenu.cpp:101
CFontBackgroundMenu::m_hwnd
HWND m_hwnd
Definition:
CFontBackgroundMenu.h:14
CFontBackgroundMenu::QueryContextMenu
STDMETHODIMP QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override
Definition:
CFontBackgroundMenu.cpp:31
CFontExt
Definition:
CFontExt.hpp:17
wParam
WPARAM wParam
Definition:
combotst.c:138
lParam
LPARAM lParam
Definition:
combotst.c:139
uFlags
UINT uFlags
Definition:
api.c:59
HRESULT
Definition:
mshtmhst.idl:286
IContextMenu2
Definition:
shobjidl.idl:1780
IContextMenu3
Definition:
shobjidl.idl:1800
IContextMenu
Definition:
shobjidl.idl:1650
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
END_COM_MAP
#define END_COM_MAP()
Definition:
atlcom.h:592
LPARAM
LONG_PTR LPARAM
Definition:
minwindef.h:175
LRESULT
LONG_PTR LRESULT
Definition:
minwindef.h:176
WPARAM
UINT_PTR WPARAM
Definition:
minwindef.h:174
HMENU
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition:
ordinal.c:60
UINT_PTR
unsigned __int3264 UINT_PTR
Definition:
mstsclib_h.h:274
UINT
unsigned int UINT
Definition:
ndis.h:50
LPFNDFMCALLBACK
HRESULT(CALLBACK * LPFNDFMCALLBACK)(_In_opt_ IShellFolder *, _In_opt_ HWND, _In_opt_ IDataObject *, UINT, WPARAM, LPARAM)
Definition:
shlobj.h:2574
DEFCONTEXTMENU
Definition:
shlobj.h:2554
IContextMenu::tagCMINVOKECOMMANDINFO
Definition:
shobjidl.idl:1721
WINAPI
#define WINAPI
Definition:
msvc.h:6
lpReserved
_In_ DWORD _In_ int _In_ int _In_opt_ LPNLSVERSIONINFO _In_opt_ LPVOID lpReserved
Definition:
winnls.h:1268
Initialize
static void Initialize()
Definition:
xlate.c:212
LPSTR
char * LPSTR
Definition:
xmlstorage.h:182
dll
shellext
fontext
CFontBackgroundMenu.h
Generated on Sun Jan 25 2026 06:03:59 for ReactOS by
1.9.6