mirror of
https://github.com/reactos/reactos.git
synced 2024-11-23 19:43:31 +08:00
[SHELL32] Fix menu item handling
This restores the 'properties' functionality on the desktop Bug found by Hervé Poussineau
This commit is contained in:
parent
7b33915adc
commit
5bd86b8487
@ -646,7 +646,7 @@ CDefaultContextMenu::QueryContextMenu(
|
||||
QCMINFO qcminfo = {hMenu, IndexMenu, idCmdNext, idCmdLast, NULL};
|
||||
if (SUCCEEDED(_DoCallback(DFM_MERGECONTEXTMENU, uFlags, &qcminfo)))
|
||||
{
|
||||
UINT added = idCmdNext - (idCmdFirst + cIds);
|
||||
UINT added = qcminfo.idCmdFirst - idCmdNext;
|
||||
cIds += added;
|
||||
IndexMenu += added;
|
||||
m_iIdCBFirst = m_iIdSHELast;
|
||||
|
@ -860,7 +860,7 @@ HRESULT WINAPI CDesktopFolder::CallBack(IShellFolder *psf, HWND hwndOwner, IData
|
||||
QCMINFO *pqcminfo = (QCMINFO *)lParam;
|
||||
HMENU hpopup = CreatePopupMenu();
|
||||
_InsertMenuItemW(hpopup, 0, TRUE, 0, MFT_STRING, MAKEINTRESOURCEW(IDS_PROPERTIES), MFS_ENABLED);
|
||||
Shell_MergeMenus(pqcminfo->hmenu, hpopup, pqcminfo->indexMenu++, pqcminfo->idCmdFirst, pqcminfo->idCmdLast, MM_ADDSEPARATOR);
|
||||
Shell_MergeMenus(pqcminfo->hmenu, hpopup, pqcminfo->indexMenu, pqcminfo->idCmdFirst++, pqcminfo->idCmdLast, MM_ADDSEPARATOR);
|
||||
DestroyMenu(hpopup);
|
||||
}
|
||||
|
||||
@ -887,4 +887,4 @@ HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
|
||||
|
||||
TRACE("-- %p->(%p)\n",psf, *psf);
|
||||
return hres;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user