From 0f36ec47c92d6711b615607be2d77f2022b73b82 Mon Sep 17 00:00:00 2001 From: Hidenori Takeshima Date: Sat, 26 Feb 2000 19:32:44 +0000 Subject: [PATCH] ArrangeCtrlPositions: fix for user-defined template with no stc32. --- dlls/commdlg/filedlg95.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/commdlg/filedlg95.c b/dlls/commdlg/filedlg95.c index 95f936e2cf0..b62fce950b5 100644 --- a/dlls/commdlg/filedlg95.c +++ b/dlls/commdlg/filedlg95.c @@ -491,7 +491,8 @@ void ArrangeCtrlPositions( HWND hwndChildDlg, HWND hwndParentDlg) { if( (GetWindow(hwndChildDlg,GW_CHILD)) == (HWND) NULL) return; - ptParentClient.x = rectParent.right-rectParent.left; + SetRectEmpty(&rectTemp); + ptParentClient.x = max((rectParent.right-rectParent.left),(rectChild.right-rectChild.left)); ptParentClient.y = (rectParent.bottom-rectParent.top) + (rectChild.bottom-rectChild.top); ptMoveCtl.y = rectParent.bottom-rectParent.top; ptMoveCtl.x=0; @@ -528,14 +529,14 @@ void ArrangeCtrlPositions( HWND hwndChildDlg, HWND hwndParentDlg) Check the initial position of the controls relative to the initial position and size of stc32 (before it is expanded). */ - if (rectCtrl.left > rectTemp.right && rectCtrl.top > rectTemp.bottom) + if (rectCtrl.left >= rectTemp.right && rectCtrl.top >= rectTemp.bottom) { rectCtrl.left += ptMoveCtl.x; rectCtrl.top += ptMoveCtl.y; } - else if (rectCtrl.left > rectTemp.right) + else if (rectCtrl.left >= rectTemp.right) rectCtrl.left += ptMoveCtl.x; - else if (rectCtrl.top > rectTemp.bottom) + else if (rectCtrl.top >= rectTemp.bottom) rectCtrl.top += ptMoveCtl.y; SetWindowPos( hwndChild, 0, rectCtrl.left, rectCtrl.top, -- 2.11.4.GIT