From 3ff6a487d604008243774127a808b6adf247efdb Mon Sep 17 00:00:00 2001 From: Adam Gundy Date: Fri, 7 Mar 2003 20:29:31 +0000 Subject: [PATCH] ArrangeCtrlPositions() did not cope correctly with a templated dialog which has an extra 'preview' control to the right of the 'marker' control. FILEDLG95_Handle_GetFilePath() did not return the path - it wasn't combining the path with the filename. --- dlls/commdlg/filedlg95.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/commdlg/filedlg95.c b/dlls/commdlg/filedlg95.c index 7b46869c72a..e71f0e2486c 100644 --- a/dlls/commdlg/filedlg95.c +++ b/dlls/commdlg/filedlg95.c @@ -550,9 +550,9 @@ void ArrangeCtrlPositions( HWND hwndChildDlg, HWND hwndParentDlg) SetRect(&rectParent,rectParent.left,rectParent.top,rectParent.left+ptParentClient.x,rectParent.top+ptParentClient.y); AdjustWindowRectEx( &rectParent,GetWindowLongA(hwndParentDlg,GWL_STYLE),FALSE,GetWindowLongA(hwndParentDlg,GWL_EXSTYLE)); - SetWindowPos(hwndChildDlg, 0, 0,0, ptParentClient.x,ptParentClient.y, SWP_NOZORDER ); - SetWindowPos(hwndParentDlg, 0, rectParent.left,rectParent.top, (rectParent.right- rectParent.left), - (rectParent.bottom-rectParent.top),SWP_NOMOVE | SWP_NOZORDER); + SetWindowPos(hwndChildDlg, 0, 0,0, ptParentClient.x + ptMoveCtl.x,ptParentClient.y + ptMoveCtl.y, SWP_NOZORDER ); + SetWindowPos(hwndParentDlg, 0, rectParent.left,rectParent.top, (rectParent.right- rectParent.left) + ptMoveCtl.x, + (rectParent.bottom-rectParent.top) + ptMoveCtl.y,SWP_NOMOVE | SWP_NOZORDER); hwndChild = GetWindow(hwndChildDlg,GW_CHILD); if(hwndStc32) @@ -586,10 +586,12 @@ void ArrangeCtrlPositions( HWND hwndChildDlg, HWND hwndParentDlg) else if (rectCtrl.left >= rectTemp.right) { rectCtrl.left += ptMoveCtl.x; + rectCtrl.right += ptMoveCtl.x; } else if (rectCtrl.top >= rectTemp.bottom) { rectCtrl.top += ptMoveCtl.y; + rectCtrl.bottom += ptMoveCtl.y; } SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, @@ -618,7 +620,9 @@ void ArrangeCtrlPositions( HWND hwndChildDlg, HWND hwndParentDlg) MapWindowPoints( 0, hwndParentDlg,(LPPOINT)&rectCtrl,2); rectCtrl.left += ptMoveCtl.x; + rectCtrl.right += ptMoveCtl.x; rectCtrl.top += ptMoveCtl.y; + rectCtrl.bottom += ptMoveCtl.y; SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, rectCtrl.right-rectCtrl.left,rectCtrl.bottom-rectCtrl.top, @@ -809,8 +813,12 @@ HRESULT FILEDLG95_Handle_GetFilePath(HWND hwnd, DWORD size, LPSTR buffer) buffer, size, NULL, NULL); if(n %s\n",debugstr_a(buffer)); -- 2.11.4.GIT