Author: gadamopoulos Date: Mon Aug 17 11:22:11 2015 New Revision: 68727
URL: http://svn.reactos.org/svn/reactos?rev=68727&view=rev Log: [SHELL32] - Do not try to set the site of the context menu from the CDefView. This should be done elsewhere and should be the context menu callback.
Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp
Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView.... ============================================================================== --- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Mon Aug 17 11:22:11 2015 @@ -1223,10 +1223,6 @@ if (FAILED(hResult)) goto cleanup;
- hResult = IUnknown_SetSite(m_pCM, (IShellView *)this); - //if (FAILED( hResult)) - // goto cleanup; - hResult = m_pCM->QueryContextMenu(hMenu, 0, 0x20, 0x7fff, CMF_DEFAULTONLY); if (FAILED(hResult)) goto cleanup; @@ -1251,10 +1247,7 @@ DestroyMenu(hMenu);
if (m_pCM) - { - IUnknown_SetSite(m_pCM, NULL); m_pCM.Release(); - }
return hResult; } @@ -1290,10 +1283,6 @@ if (FAILED( hResult)) goto cleanup;
- hResult = IUnknown_SetSite(m_pCM, (IShellView *)this); - //if (FAILED( hResult)) - // goto cleanup; - hResult = m_pCM->QueryContextMenu(hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, CMF_NORMAL); if (FAILED( hResult)) goto cleanup; @@ -1319,10 +1308,7 @@ cleanup:
if (m_pCM) - { - IUnknown_SetSite(m_pCM, NULL); m_pCM.Release(); - }
if (hMenu) DestroyMenu(hMenu); @@ -1343,10 +1329,6 @@ hResult = GetItemObject( bUseSelection ? SVGIO_SELECTION : SVGIO_BACKGROUND, IID_PPV_ARG(IContextMenu, &m_pCM)); if (FAILED( hResult)) goto cleanup; - - hResult = IUnknown_SetSite(m_pCM, (IShellView *)this); - //if (FAILED( hResult)) - // goto cleanup;
hResult = m_pCM->QueryContextMenu(hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, CMF_NORMAL); if (FAILED( hResult)) @@ -1361,10 +1343,7 @@ cleanup:
if (m_pCM) - { - IUnknown_SetSite(m_pCM, NULL); m_pCM.Release(); - }
if (hMenu) DestroyMenu(hMenu);