mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 13:16:07 +00:00
[shell32]
- Fix double click or right click on the shell view control. svn path=/trunk/; revision=60957
This commit is contained in:
parent
2662feed4e
commit
16826f4c0c
1 changed files with 10 additions and 5 deletions
|
@ -100,7 +100,7 @@ class CDefView :
|
|||
UINT cScrollDelay; /* Send a WM_*SCROLL msg every 250 ms during drag-scroll */
|
||||
POINT ptLastMousePos; /* Mouse position at last DragOver call */
|
||||
//
|
||||
CComPtr<IContextMenu2> pCM;
|
||||
CComPtr<IContextMenu> pCM;
|
||||
public:
|
||||
CDefView();
|
||||
~CDefView();
|
||||
|
@ -1114,7 +1114,7 @@ HRESULT CDefView::OpenSelectedItems()
|
|||
if (!hMenu)
|
||||
return E_FAIL;
|
||||
|
||||
hResult = GetItemObject( SVGIO_SELECTION, IID_PPV_ARG(IContextMenu2, &pCM));
|
||||
hResult = GetItemObject( SVGIO_SELECTION, IID_PPV_ARG(IContextMenu, &pCM));
|
||||
if (FAILED(hResult))
|
||||
goto cleanup;
|
||||
|
||||
|
@ -1181,7 +1181,7 @@ LRESULT CDefView::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &b
|
|||
|
||||
cidl = ListView_GetSelectedCount(hWndList);
|
||||
|
||||
hResult = GetItemObject( cidl ? SVGIO_SELECTION : SVGIO_BACKGROUND, IID_PPV_ARG(IContextMenu2, &pCM));
|
||||
hResult = GetItemObject( cidl ? SVGIO_SELECTION : SVGIO_BACKGROUND, IID_PPV_ARG(IContextMenu, &pCM));
|
||||
if (FAILED( hResult))
|
||||
goto cleanup;
|
||||
|
||||
|
@ -1235,7 +1235,7 @@ LRESULT CDefView::OnExplorerCommand(UINT uCommand, BOOL bUseSelection)
|
|||
if (!hMenu)
|
||||
return 0;
|
||||
|
||||
hResult = GetItemObject( bUseSelection ? SVGIO_SELECTION : SVGIO_BACKGROUND, IID_PPV_ARG(IContextMenu2, &pCM));
|
||||
hResult = GetItemObject( bUseSelection ? SVGIO_SELECTION : SVGIO_BACKGROUND, IID_PPV_ARG(IContextMenu, &pCM));
|
||||
if (FAILED( hResult))
|
||||
goto cleanup;
|
||||
|
||||
|
@ -1814,7 +1814,12 @@ LRESULT CDefView::OnCustomItem(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bH
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (pCM.p->HandleMenuMsg(uMsg, (WPARAM)m_hWnd, lParam) == S_OK)
|
||||
CComPtr<IContextMenu2> pCM2;
|
||||
HRESULT hres = pCM.p->QueryInterface(IID_PPV_ARG(IContextMenu2, &pCM2));
|
||||
if(FAILED(hres))
|
||||
return FALSE;
|
||||
|
||||
if (pCM2.p->HandleMenuMsg(uMsg, (WPARAM)m_hWnd, lParam) == S_OK)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue