https://git.reactos.org/?p=reactos.git;a=commitdiff;h=572976bb1458d57a97733…
commit 572976bb1458d57a97733a51a709e20f9c97c6e2
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Thu Aug 2 22:36:17 2018 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Aug 5 11:54:56 2018 +0200
[ZIPFLDR] Add 'Extract All' to individual item context menu.
---
dll/shellext/zipfldr/CZipFolder.hpp | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/dll/shellext/zipfldr/CZipFolder.hpp b/dll/shellext/zipfldr/CZipFolder.hpp
index 74dc42107b..b541263935 100644
--- a/dll/shellext/zipfldr/CZipFolder.hpp
+++ b/dll/shellext/zipfldr/CZipFolder.hpp
@@ -356,9 +356,33 @@ public:
switch (uMsg)
{
case DFM_MERGECONTEXTMENU:
- DPRINT1("FIXME: Add menu items for DFM_MERGECONTEXTMENU\n");
+ {
+ CComQIIDPtr<I_ID(IContextMenu)> spContextMenu(psf);
+ if (!spContextMenu)
+ return E_NOINTERFACE;
+
+ QCMINFO *pqcminfo = (QCMINFO *)lParam;
+ HRESULT hr = spContextMenu->QueryContextMenu(pqcminfo->hmenu,
+ pqcminfo->indexMenu,
+ pqcminfo->idCmdFirst,
+ pqcminfo->idCmdLast,
+ CMF_NORMAL);
+ if (FAILED_UNEXPECTEDLY(hr))
+ return hr;
+
+ pqcminfo->indexMenu += HRESULT_CODE(hr);
return S_OK;
+ }
case DFM_INVOKECOMMAND:
+ {
+ CComQIIDPtr<I_ID(IContextMenu)> spContextMenu(psf);
+ if (!spContextMenu)
+ return E_NOINTERFACE;
+
+ CMINVOKECOMMANDINFO ici = { sizeof(ici) };
+ ici.lpVerb = MAKEINTRESOURCEA(wParam);
+ return spContextMenu->InvokeCommand(&ici);
+ }
case DFM_INVOKECOMMANDEX:
case DFM_GETDEFSTATICID: // Required for Windows 7 to pick a default
return S_FALSE;