Author: gadamopoulos
Date: Fri Dec 16 10:31:13 2016
New Revision: 73459
URL:
http://svn.reactos.org/svn/reactos?rev=73459&view=rev
Log:
[SHELL32] - CNetFolder: Fix opening items which was broken after having a callback for the
default context menu became mandatory.
Modified:
trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp
Modified: trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CNetFolder.cpp [iso-8859-1] Fri Dec 16
10:31:13 2016
@@ -61,6 +61,25 @@
return initIcon->QueryInterface(riid, ppvOut);
}
+HRESULT CALLBACK NetFolderMenuCallback(IShellFolder *psf,
+ HWND hwnd,
+ IDataObject *pdtobj,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case DFM_MERGECONTEXTMENU:
+ return S_OK;
+ case DFM_INVOKECOMMAND:
+ case DFM_INVOKECOMMANDEX:
+ case DFM_GETDEFSTATICID: // Required for Windows 7 to pick a default
+ return S_FALSE;
+ }
+ return E_NOTIMPL;
+}
+
class CNetFolderEnum :
public CEnumIDListBase
{
@@ -421,7 +440,7 @@
HKEY hkey;
UINT cKeys = 0;
AddClassKeyToArray(L"Folder", &hkey, &cKeys);
- hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl,
static_cast<IShellFolder*>(this), NULL, cKeys, &hkey, &pCm);
+ hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl, this,
NetFolderMenuCallback, cKeys, &hkey, &pCm);
pObj = pCm;
}
else if (IsEqualIID(riid, IID_IDataObject) && (cidl >= 1))