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
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;
19
20public:
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;
28 STDMETHODIMP GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override;
29
30 // IContextMenu2
32
33 // IContextMenu3
35
37 COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu)
38 COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2)
39 COM_INTERFACE_ENTRY_IID(IID_IContextMenu3, IContextMenu3)
41};
#define STDMETHODIMP
Definition: basetyps.h:43
CComPtr< IContextMenuCB > m_pmcb
LPFNDFMCALLBACK m_pfnmcb
STDMETHODIMP HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) override
CComPtr< IShellFolder > m_psf
STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) override
STDMETHODIMP GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override
STDMETHODIMP HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult) override
STDMETHODIMP QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
UINT uFlags
Definition: api.c:59
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:601
#define END_COM_MAP()
Definition: atlcom.h:592
LONG_PTR LPARAM
Definition: minwindef.h:175
LONG_PTR LRESULT
Definition: minwindef.h:176
UINT_PTR WPARAM
Definition: minwindef.h:174
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned int UINT
Definition: ndis.h:50
HRESULT(CALLBACK * LPFNDFMCALLBACK)(_In_opt_ IShellFolder *, _In_opt_ HWND, _In_opt_ IDataObject *, UINT, WPARAM, LPARAM)
Definition: shlobj.h:2574
#define WINAPI
Definition: msvc.h:6
_In_ DWORD _In_ int _In_ int _In_opt_ LPNLSVERSIONINFO _In_opt_ LPVOID lpReserved
Definition: winnls.h:1268
static void Initialize()
Definition: xlate.c:212
char * LPSTR
Definition: xmlstorage.h:182