mirror of
https://github.com/reactos/reactos.git
synced 2026-07-05 05:44:20 +08:00
[FONTEXT][SHELL32][SDK] Support delete operation (#8639)
Improve usability of Fonts folder. JIRA issue: CORE-17311 - Modify PIDL design to contain name and filename. - Implement CFontExt:: ParseDisplayName to parsing name as PIDL. - Modify CDefaultContextMenu:: GetCommandString and CDefaultContextMenu:: DoCopyOrCut for DFM_GETVERBA, DFM_GETVERBW, DFM_CMD_COPY, and DFM_CMD_MOVE. - Add IDS_CONFIRM_DELETE_FONT, IDS_CANTDELETEFONT, and IDS_PROPERTIES resource strings. - Add SHMultiFileProperties prototype to <shlobj.h>.
This commit is contained in:
committed by
GitHub
parent
5213cf717c
commit
6af07a31b0
@@ -1159,6 +1159,10 @@ HRESULT CDefaultContextMenu::DoCopyOrCut(LPCMINVOKECOMMANDINFOEX lpcmi, BOOL bCo
|
||||
if (!m_cidl || !m_pDataObj)
|
||||
return E_FAIL;
|
||||
|
||||
HRESULT hr = _DoInvokeCommandCallback(lpcmi, bCopy ? DFM_CMD_COPY : DFM_CMD_MOVE);
|
||||
if (hr == S_OK)
|
||||
return hr;
|
||||
|
||||
FORMATETC formatetc;
|
||||
InitFormatEtc(formatetc, RegisterClipboardFormatW(CFSTR_PREFERREDDROPEFFECT), TYMED_HGLOBAL);
|
||||
STGMEDIUM medium = {0};
|
||||
@@ -1174,7 +1178,7 @@ HRESULT CDefaultContextMenu::DoCopyOrCut(LPCMINVOKECOMMANDINFOEX lpcmi, BOOL bCo
|
||||
if (SUCCEEDED(IUnknown_QueryService(m_site, SID_SFolderView, IID_PPV_ARG(IShellFolderView, &psfv))))
|
||||
psfv->SetPoints(m_pDataObj);
|
||||
|
||||
HRESULT hr = OleSetClipboard(m_pDataObj);
|
||||
hr = OleSetClipboard(m_pDataObj);
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return hr;
|
||||
|
||||
@@ -1775,6 +1779,15 @@ CDefaultContextMenu::GetCommandString(
|
||||
|
||||
UINT CmdId = LOWORD(idCommand);
|
||||
|
||||
if (uFlags == GCS_VERBA || uFlags == GCS_VERBW)
|
||||
{
|
||||
UINT uMsg = (uFlags == GCS_VERBA) ? DFM_GETVERBA : DFM_GETVERBW;
|
||||
WPARAM wParam = MAKEWPARAM(idCommand, uMaxNameLen);
|
||||
HRESULT hr = _DoCallback(uMsg, wParam, lpszName);
|
||||
if (hr == S_OK)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if (!m_DynamicEntries.IsEmpty() && CmdId >= m_iIdSHEFirst && CmdId < m_iIdSHELast)
|
||||
{
|
||||
idCommand -= m_iIdSHEFirst;
|
||||
|
||||
Reference in New Issue
Block a user