Aric Stewart : propsheet: Do not change idea of size when new pages are added.

Alexandre Julliard julliard at winehq.org
Fri Sep 14 10:15:58 CDT 2007


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

Author: Aric Stewart <aric at codeweavers.com>
Date:   Thu Sep 13 07:53:45 2007 -0500

propsheet: Do not change idea of size when new pages are added.

---

 dlls/comctl32/propsheet.c |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index d5142a8..cc9242d 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -402,7 +402,7 @@ static void PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh,
  */
 static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
                                PropSheetInfo * psInfo,
-                               int index)
+                               int index, BOOL resize)
 {
   const DLGTEMPLATE* pTemplate;
   const WORD*  p;
@@ -503,11 +503,14 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
   }
 
   /* remember the largest width and height */
-  if (width > psInfo->width)
-    psInfo->width = width;
+  if (resize)
+  {
+      if (width > psInfo->width)
+        psInfo->width = width;
 
-  if (height > psInfo->height)
-    psInfo->height = height;
+      if (height > psInfo->height)
+        psInfo->height = height;
+  }
 
   /* menu */
   switch ((WORD)*p)
@@ -2284,7 +2287,7 @@ static BOOL PROPSHEET_AddPage(HWND hwndDlg,
       return FALSE;
 
   psInfo->proppage = ppi;
-  if (!PROPSHEET_CollectPageInfo(ppsp, psInfo, psInfo->nPages))
+  if (!PROPSHEET_CollectPageInfo(ppsp, psInfo, psInfo->nPages, FALSE))
       return FALSE;
 
   psInfo->proppage[psInfo->nPages].hpage = hpage;
@@ -2840,7 +2843,7 @@ INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
     }
 
     if (!PROPSHEET_CollectPageInfo((LPCPROPSHEETPAGEW)psInfo->proppage[n].hpage,
-                               psInfo, n))
+                               psInfo, n, TRUE))
     {
 	if (psInfo->usePropPage)
 	    DestroyPropertySheetPage(psInfo->proppage[n].hpage);
@@ -2883,7 +2886,7 @@ INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
     }
 
     if (!PROPSHEET_CollectPageInfo((LPCPROPSHEETPAGEW)psInfo->proppage[n].hpage,
-                               psInfo, n))
+                               psInfo, n, TRUE))
     {
 	if (psInfo->usePropPage)
 	    DestroyPropertySheetPage(psInfo->proppage[n].hpage);




More information about the wine-cvs mailing list