Author: gadamopoulos
Date: Mon Nov 11 22:36:26 2013
New Revision: 60957
URL:
http://svn.reactos.org/svn/reactos?rev=60957&view=rev
Log:
[shell32]
- Fix double click or right click on the shell view control.
Modified:
trunk/reactos/dll/win32/shell32/shlview.cpp
Modified: trunk/reactos/dll/win32/shell32/shlview.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlview.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shlview.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shlview.cpp [iso-8859-1] Mon Nov 11 22:36:26 2013
@@ -100,7 +100,7 @@
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 @@
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 @@
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 @@
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 @@
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;