[SHELL32]
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Sat, 5 Nov 2016 15:05:00 +0000 (15:05 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Sat, 5 Nov 2016 15:05:00 +0000 (15:05 +0000)
CDesktopBrowser: Forward the parameters pased in CDesktopBrowser::BrowseObject to SHOpenNewFrame. Thus the same parameters are eventually passed to CShellBrowser::Initialize.

[BROWSEUI]
CShellBrowser: Handle SBSP_EXPLOREMODE flag so as to show the tree view when the user selects the Explore option from the context menu.

svn path=/trunk/; revision=73134

reactos/dll/win32/browseui/shellbrowser.cpp
reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp

index 8419af6..63c5869 100644 (file)
@@ -780,6 +780,9 @@ HRESULT CShellBrowser::Initialize(LPITEMIDLIST pidl, DWORD dwFlags)
     if (FAILED_UNEXPECTEDLY(hResult))
         return hResult;
 
     if (FAILED_UNEXPECTEDLY(hResult))
         return hResult;
 
+    if ((dwFlags & SBSP_EXPLOREMODE) != NULL)
+        ShowBand(CLSID_ExplorerBand, true);
+
     ShowWindow(SW_SHOWNORMAL);
 
     return S_OK;
     ShowWindow(SW_SHOWNORMAL);
 
     return S_OK;
@@ -2182,6 +2185,9 @@ HRESULT STDMETHODCALLTYPE CShellBrowser::TranslateAcceleratorSB(MSG *pmsg, WORD
 
 HRESULT STDMETHODCALLTYPE CShellBrowser::BrowseObject(LPCITEMIDLIST pidl, UINT wFlags)
 {
 
 HRESULT STDMETHODCALLTYPE CShellBrowser::BrowseObject(LPCITEMIDLIST pidl, UINT wFlags)
 {
+    if ((wFlags & SBSP_EXPLOREMODE) != NULL)
+        ShowBand(CLSID_ExplorerBand, true);
+
     return BrowseToPIDL(pidl, BTP_UPDATE_CUR_HISTORY | BTP_UPDATE_NEXT_HISTORY);
 }
 
     return BrowseToPIDL(pidl, BTP_UPDATE_CUR_HISTORY | BTP_UPDATE_NEXT_HISTORY);
 }
 
index 7335041..fe64747 100644 (file)
@@ -284,7 +284,7 @@ HRESULT STDMETHODCALLTYPE CDesktopBrowser::BrowseObject(LPCITEMIDLIST pidl, UINT
      * find an open shell window that shows the requested pidl and activate it
      */
 
      * find an open shell window that shows the requested pidl and activate it
      */
 
-    return SHOpenNewFrame((LPITEMIDLIST)pidl, NULL, 0, 0);
+    return SHOpenNewFrame((LPITEMIDLIST)pidl, NULL, 0, wFlags);
 }
 
 HRESULT STDMETHODCALLTYPE CDesktopBrowser::GetViewStateStream(DWORD grfMode, IStream **ppStrm)
 }
 
 HRESULT STDMETHODCALLTYPE CDesktopBrowser::GetViewStateStream(DWORD grfMode, IStream **ppStrm)