mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[SHELL32] CDefView: Implement SFVM_GETCOMMANDIR callback (#6941)
Implementing missing folder view callbacks... JIRA issue: CORE-19616 - In CDefView::InvokeContextMenuCommand, call SFVM_GETCOMMANDDIR callback and store the directory into CMINVOKECOMMANDINFOEX structure.
This commit is contained in:
parent
ef693390ef
commit
d56e507e95
1 changed files with 11 additions and 0 deletions
|
@ -1582,6 +1582,17 @@ HRESULT CDefView::InvokeContextMenuCommand(CComPtr<IContextMenu>& pCM, LPCSTR lp
|
|||
cmi.ptInvoke = *pt;
|
||||
}
|
||||
|
||||
WCHAR szDirW[MAX_PATH] = L"";
|
||||
CHAR szDirA[MAX_PATH];
|
||||
if (SUCCEEDED(_DoFolderViewCB(SFVM_GETCOMMANDDIR, _countof(szDirW), (LPARAM)szDirW)) &&
|
||||
*szDirW != UNICODE_NULL)
|
||||
{
|
||||
SHUnicodeToAnsi(szDirW, szDirA, _countof(szDirA));
|
||||
cmi.fMask |= CMIC_MASK_UNICODE;
|
||||
cmi.lpDirectory = szDirA;
|
||||
cmi.lpDirectoryW = szDirW;
|
||||
}
|
||||
|
||||
HRESULT hr = pCM->InvokeCommand((LPCMINVOKECOMMANDINFO)&cmi);
|
||||
// Most of our callers will do this, but if they would forget (File menu!)
|
||||
IUnknown_SetSite(pCM, NULL);
|
||||
|
|
Loading…
Reference in a new issue