diff --git a/dlls/commdlg/filedlg95.c b/dlls/commdlg/filedlg95.c index f8f74700425..8983b65a8ce 100644 --- a/dlls/commdlg/filedlg95.c +++ b/dlls/commdlg/filedlg95.c @@ -1987,10 +1987,6 @@ static HRESULT FILEDLG95_SHELL_Init(HWND hwnd) fodInfos->ShellInfos.folderSettings.fFlags |= FWF_AUTOARRANGE | FWF_ALIGNLEFT; fodInfos->ShellInfos.folderSettings.ViewMode = FVM_LIST; - GetWindowRect(GetDlgItem(hwnd,IDC_SHELLSTATIC),&fodInfos->ShellInfos.rectView); - ScreenToClient(hwnd,(LPPOINT)&fodInfos->ShellInfos.rectView.left); - ScreenToClient(hwnd,(LPPOINT)&fodInfos->ShellInfos.rectView.right); - /* Construct the IShellBrowser interface */ fodInfos->Shell.FOIShellBrowser = IShellBrowserImpl_Construct(hwnd); diff --git a/dlls/commdlg/filedlgbrowser.c b/dlls/commdlg/filedlgbrowser.c index 43975cbf9e7..c53ec21a932 100644 --- a/dlls/commdlg/filedlgbrowser.c +++ b/dlls/commdlg/filedlgbrowser.c @@ -305,6 +305,7 @@ HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface, HWND hwndView; HWND hDlgWnd; BOOL bViewHasFocus; + RECT rectView; ICOM_THIS(IShellBrowserImpl, iface); @@ -400,11 +401,14 @@ HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface, COMDLG32_UpdateCurrentDir(fodInfos); + GetWindowRect(GetDlgItem(This->hwndOwner, IDC_SHELLSTATIC), &rectView); + MapWindowPoints(0, This->hwndOwner, (LPPOINT)&rectView, 2); + /* Create the window */ TRACE("create view window\n"); if(FAILED(hRes = IShellView_CreateViewWindow(psvTmp, NULL, &fodInfos->ShellInfos.folderSettings, fodInfos->Shell.FOIShellBrowser, - &fodInfos->ShellInfos.rectView, &hwndView))) goto error; + &rectView, &hwndView))) goto error; fodInfos->ShellInfos.hwndView = hwndView; diff --git a/dlls/commdlg/filedlgbrowser.h b/dlls/commdlg/filedlgbrowser.h index 87e790b41e5..2c4c65a27e5 100644 --- a/dlls/commdlg/filedlgbrowser.h +++ b/dlls/commdlg/filedlgbrowser.h @@ -68,7 +68,6 @@ typedef struct struct { HWND hwndOwner; HWND hwndView; - RECT rectView; FOLDERSETTINGS folderSettings; LPITEMIDLIST pidlAbsCurrent; LPWSTR lpstrCurrentFilter;