mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[SHELL32] Use background context if no item selected on File menu
CORE-9467
This commit is contained in:
parent
0bf9f4b301
commit
1cf564c25f
1 changed files with 4 additions and 1 deletions
|
@ -1207,8 +1207,11 @@ HRESULT CDefView::FillFileMenu()
|
|||
DeleteMenu(hFileMenu, i, MF_BYPOSITION);
|
||||
}
|
||||
|
||||
m_cidl = m_ListView.GetSelectedCount();
|
||||
|
||||
/* Store the context menu in m_pCM and keep it in order to invoke the selected command later on */
|
||||
HRESULT hr = GetItemObject(SVGIO_SELECTION, IID_PPV_ARG(IContextMenu, &m_pCM));
|
||||
HRESULT hr = GetItemObject((m_cidl ? SVGIO_SELECTION : SVGIO_BACKGROUND),
|
||||
IID_PPV_ARG(IContextMenu, &m_pCM));
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return hr;
|
||||
|
||||
|
|
Loading…
Reference in a new issue