From bbb71f8ed5614c1db9cb9313be0fd45a9effaa4a Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Sat, 31 Aug 2013 16:55:49 +0000 Subject: [PATCH] [browseui] - Improve the stub for CAddressEditBox::SetOwner to make the rest of browseui happy for now - In CShellBrowser::Initialize browse to the pidl that is passed as parameter instead of always browsing to the desktop folder - Fix a bug in atl class CContainedWindowT::DefWindowProc that was calling the window proc with an invalid hwnd. svn path=/trunk/; revision=59927 --- reactos/dll/win32/browseui/addresseditbox.cpp | 2 +- reactos/dll/win32/browseui/shellbrowser.cpp | 9 ++------- reactos/lib/atl/atlwin.h | 5 +---- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/reactos/dll/win32/browseui/addresseditbox.cpp b/reactos/dll/win32/browseui/addresseditbox.cpp index 3289bff4bf3..d3ddee88a96 100644 --- a/reactos/dll/win32/browseui/addresseditbox.cpp +++ b/reactos/dll/win32/browseui/addresseditbox.cpp @@ -50,7 +50,7 @@ CAddressEditBox::~CAddressEditBox() HRESULT STDMETHODCALLTYPE CAddressEditBox::SetOwner(IUnknown *) { // connect to browser connection point - return E_NOTIMPL; + return 0; } HRESULT STDMETHODCALLTYPE CAddressEditBox::FileSysChange(long param8, long paramC) diff --git a/reactos/dll/win32/browseui/shellbrowser.cpp b/reactos/dll/win32/browseui/shellbrowser.cpp index 233f9bf705f..df71e4eb59e 100644 --- a/reactos/dll/win32/browseui/shellbrowser.cpp +++ b/reactos/dll/win32/browseui/shellbrowser.cpp @@ -798,17 +798,12 @@ HRESULT CShellBrowser::Initialize(LPITEMIDLIST pidl, long b, long c, long d) _AtlBaseModule.GetModuleInstance(), 0); fStatusBarVisible = true; - LPITEMIDLIST desktopPIDL; FOLDERSETTINGS newFolderSettings; - // browse desktop - hResult = SHGetFolderLocation(NULL, CSIDL_DESKTOP, NULL, 0, &desktopPIDL); - if (FAILED(hResult)) - return hResult; + // browse newFolderSettings.ViewMode = FVM_LIST; newFolderSettings.fFlags = 0; - hResult = BrowseToPIDL(desktopPIDL, BTP_UPDATE_NEXT_HISTORY); - ILFree(desktopPIDL); + hResult = BrowseToPIDL(pidl, BTP_UPDATE_NEXT_HISTORY); if (FAILED(hResult)) return hResult; diff --git a/reactos/lib/atl/atlwin.h b/reactos/lib/atl/atlwin.h index fa5550e38c8..cc925758585 100644 --- a/reactos/lib/atl/atlwin.h +++ b/reactos/lib/atl/atlwin.h @@ -585,10 +585,7 @@ public: LRESULT DefWindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { - CWindowImplBaseT *pThis; - - pThis = reinterpret_cast *>(this); - return ::CallWindowProc(m_pfnSuperWindowProc, pThis->m_hWnd, uMsg, wParam, lParam); + return ::CallWindowProc(m_pfnSuperWindowProc, this->m_hWnd, uMsg, wParam, lParam); } BOOL SubclassWindow(HWND hWnd)