mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 07:26:20 +00:00
[SHELL32] - CNetFolder: Fix opening items which was broken after having a callback for the default context menu became mandatory.
svn path=/trunk/; revision=73459
This commit is contained in:
parent
a54d1167e4
commit
668ef9aa19
1 changed files with 20 additions and 1 deletions
|
@ -61,6 +61,25 @@ HRESULT CNetFolderExtractIcon_CreateInstance(LPCITEMIDLIST pidl, REFIID riid, LP
|
|||
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 @@ HRESULT WINAPI CNetFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CH
|
|||
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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue