mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 15:36:04 +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");
|
ERR("Can't get IContextMenu interface\n");
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IUnknown_SetSite(contextMenu, (IDeskBand *)this);
|
||||||
|
|
||||||
treeMenu = CreatePopupMenu();
|
treeMenu = CreatePopupMenu();
|
||||||
hr = contextMenu->QueryContextMenu(treeMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST,
|
hr = contextMenu->QueryContextMenu(treeMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST,
|
||||||
CMF_EXPLORE);
|
CMF_EXPLORE);
|
||||||
|
@ -468,7 +471,10 @@ LRESULT CExplorerBand::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BO
|
||||||
x, y, 0, m_hWnd, NULL);
|
x, y, 0, m_hWnd, NULL);
|
||||||
|
|
||||||
ExecuteCommand(contextMenu, uCommand);
|
ExecuteCommand(contextMenu, uCommand);
|
||||||
|
|
||||||
Cleanup:
|
Cleanup:
|
||||||
|
if (contextMenu)
|
||||||
|
IUnknown_SetSite(contextMenu, NULL);
|
||||||
if (treeMenu)
|
if (treeMenu)
|
||||||
DestroyMenu(treeMenu);
|
DestroyMenu(treeMenu);
|
||||||
bNavigating = TRUE;
|
bNavigating = TRUE;
|
||||||
|
@ -1192,8 +1198,8 @@ HRESULT STDMETHODCALLTYPE CExplorerBand::Exec(const GUID *pguidCmdGroup, DWORD n
|
||||||
// *** IServiceProvider methods ***
|
// *** IServiceProvider methods ***
|
||||||
HRESULT STDMETHODCALLTYPE CExplorerBand::QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
|
HRESULT STDMETHODCALLTYPE CExplorerBand::QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
/* FIXME: we probably want to handle more services here */
|
||||||
return E_NOTIMPL;
|
return IUnknown_QueryService(pSite, SID_SShellBrowser, riid, ppvObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue