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

This commit is contained in:
Aric Stewart 2007-09-13 07:53:45 -05:00 committed by Alexandre Julliard
parent adc09ad52a
commit 7d947c16cb
1 changed files with 11 additions and 8 deletions

View File

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