Vitaliy Margolen : comctl32: Use style to distinguish between embedded and standalone propsheets.

Alexandre Julliard julliard at winehq.org
Mon Feb 9 10:29:39 CST 2009


Module: wine
Branch: master
Commit: c80fdb881a33a2cf9b2727400ecb67c296beed0a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c80fdb881a33a2cf9b2727400ecb67c296beed0a

Author: Vitaliy Margolen <wine-patches at kievinfo.com>
Date:   Sun Feb  8 15:43:00 2009 -0700

comctl32: Use style to distinguish between embedded and standalone propsheets.

Some programs alter propsheet style in the callback during creation to make
"embedded" propsheets. PSH_MODELESS controls modal/modeless operation only.

---

 dlls/comctl32/propsheet.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index 785643d..4640e9f 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -743,6 +743,7 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo)
   int buttonHeight;
   PADDING_INFO padding = PROPSHEET_GetPaddingInfo(hwndDlg);
   RECT units;
+  LONG style;
 
   /* Get the height of buttons */
   GetClientRect(hwndButton, &rc);
@@ -798,8 +799,9 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo)
   rc.right += (padding.x * 2);
   rc.bottom += buttonHeight + (3 * padding.y);
 
-  if (!psInfo->isModeless)
-    AdjustWindowRect(&rc, GetWindowLongW(hwndDlg, GWL_STYLE), FALSE);
+  style = GetWindowLongW(hwndDlg, GWL_STYLE);
+  if (!(style & WS_CHILD))
+    AdjustWindowRect(&rc, style, FALSE);
 
   rc.right -= rc.left;
   rc.bottom -= rc.top;




More information about the wine-cvs mailing list