mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[BROWSEUI] -CExplorerBand: Stub QueryService method and set the site of the context menu so as to let the context menu find the SID_IShellBrowser when the open menu item is clicked. CORE-11783
svn path=/trunk/; revision=74151
This commit is contained in:
parent
2ae045e8a1
commit
59aefe6216
1 changed files with 8 additions and 2 deletions
|
@ -455,6 +455,9 @@ LRESULT CExplorerBand::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BO
|
|||
ERR("Can't get IContextMenu interface\n");
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
IUnknown_SetSite(contextMenu, (IDeskBand *)this);
|
||||
|
||||
treeMenu = CreatePopupMenu();
|
||||
hr = contextMenu->QueryContextMenu(treeMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST,
|
||||
CMF_EXPLORE);
|
||||
|
@ -468,7 +471,10 @@ LRESULT CExplorerBand::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BO
|
|||
x, y, 0, m_hWnd, NULL);
|
||||
|
||||
ExecuteCommand(contextMenu, uCommand);
|
||||
|
||||
Cleanup:
|
||||
if (contextMenu)
|
||||
IUnknown_SetSite(contextMenu, NULL);
|
||||
if (treeMenu)
|
||||
DestroyMenu(treeMenu);
|
||||
bNavigating = TRUE;
|
||||
|
@ -1192,8 +1198,8 @@ HRESULT STDMETHODCALLTYPE CExplorerBand::Exec(const GUID *pguidCmdGroup, DWORD n
|
|||
// *** IServiceProvider methods ***
|
||||
HRESULT STDMETHODCALLTYPE CExplorerBand::QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return E_NOTIMPL;
|
||||
/* FIXME: we probably want to handle more services here */
|
||||
return IUnknown_QueryService(pSite, SID_SShellBrowser, riid, ppvObject);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue