mirror of
https://github.com/reactos/reactos.git
synced 2024-06-28 17:01:28 +00:00
[ZIPFLDR] Fix number of menu items returned for DFM_MERGECONTEXTMENU
This commit is contained in:
parent
936b54faa3
commit
a99325c716
|
@ -370,7 +370,7 @@ public:
|
||||||
if (FAILED_UNEXPECTEDLY(hr))
|
if (FAILED_UNEXPECTEDLY(hr))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
pqcminfo->indexMenu += HRESULT_CODE(hr);
|
pqcminfo->idCmdFirst += HRESULT_CODE(hr);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
case DFM_INVOKECOMMAND:
|
case DFM_INVOKECOMMAND:
|
||||||
|
@ -523,7 +523,7 @@ public:
|
||||||
}
|
}
|
||||||
STDMETHODIMP QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
|
STDMETHODIMP QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
|
||||||
{
|
{
|
||||||
int Entries = 0;
|
UINT idCmd = idCmdFirst;
|
||||||
|
|
||||||
if (!(uFlags & CMF_DEFAULTONLY))
|
if (!(uFlags & CMF_DEFAULTONLY))
|
||||||
{
|
{
|
||||||
|
@ -532,13 +532,11 @@ public:
|
||||||
if (indexMenu)
|
if (indexMenu)
|
||||||
{
|
{
|
||||||
InsertMenuW(hmenu, indexMenu++, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
|
InsertMenuW(hmenu, indexMenu++, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
|
||||||
Entries++;
|
|
||||||
}
|
}
|
||||||
InsertMenuW(hmenu, indexMenu++, MF_BYPOSITION | MF_STRING, idCmdFirst++, menuText);
|
InsertMenuW(hmenu, indexMenu++, MF_BYPOSITION | MF_STRING, idCmd++, menuText);
|
||||||
Entries++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Entries);
|
return MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, idCmd - idCmdFirst);
|
||||||
}
|
}
|
||||||
|
|
||||||
// *** IShellExtInit methods ***
|
// *** IShellExtInit methods ***
|
||||||
|
|
Loading…
Reference in a new issue