Files
reactos/dll/shellext/fontext/CFontBackgroundMenu.h
Katayama Hirofumi MZ 789f6c5481 [FONTEXT] Implement paste operation (#8615)
Support paste operation on Fonts folder.
JIRA issue: CORE-12861
- Add CFontBackgroundMenu.cpp and CFontBackgroundMenu.h
  to support background menu.
- Modify CFontExt::CreateViewObject and
  CFontExt::GetUIObjectOf methods.
- Re-implement foreground menu by using
  CDefFolderMenu_Create2 and CFontExt::MenuCallBack.
- Delete needless CFontMenu.cpp.
- Add IDS_PROPERTIES resource string.
2026-01-23 14:28:09 +09:00

42 lines
1.5 KiB
C++

/*
* PROJECT: ReactOS Font Shell Extension
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Fonts folder shell extension background menu
* COPYRIGHT: Copyright 2026 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#pragma once
class CFontBackgroundMenu
: public CComObjectRootEx<CComMultiThreadModelNoCS>
, public IContextMenu3
{
HWND m_hwnd = nullptr;
CFontExt* m_pFontExt = nullptr;
CComPtr<IShellFolder> m_psf;
CComPtr<IContextMenuCB> m_pmcb;
LPFNDFMCALLBACK m_pfnmcb = nullptr;
public:
CFontBackgroundMenu();
virtual ~CFontBackgroundMenu();
HRESULT WINAPI Initialize(CFontExt* pFontExt, const DEFCONTEXTMENU *pdcm);
// IContextMenu
STDMETHODIMP QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override;
STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) override;
STDMETHODIMP GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override;
// IContextMenu2
STDMETHODIMP HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam) override;
// IContextMenu3
STDMETHODIMP HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult) override;
BEGIN_COM_MAP(CFontBackgroundMenu)
COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu)
COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2)
COM_INTERFACE_ENTRY_IID(IID_IContextMenu3, IContextMenu3)
END_COM_MAP()
};