mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
Recalculate property sheet sizes after adding/removing sheets.
svn path=/trunk/; revision=24319
This commit is contained in:
parent
c25e3321b0
commit
41f18c74da
2 changed files with 14 additions and 2 deletions
|
@ -593,6 +593,7 @@ UpdateDevInfo(IN HWND hwndDlg,
|
|||
PSP_DEVINFO_DATA DeviceInfoData = NULL;
|
||||
PROPSHEETHEADER psh;
|
||||
DWORD nDriverPages = 0;
|
||||
BOOL RecalcPages = FALSE;
|
||||
|
||||
hPropSheetDlg = GetParent(hwndDlg);
|
||||
|
||||
|
@ -614,6 +615,7 @@ UpdateDevInfo(IN HWND hwndDlg,
|
|||
PropSheet_RemovePage(hPropSheetDlg,
|
||||
(WPARAM) -1,
|
||||
dap->DevPropSheets[iPage]);
|
||||
RecalcPages = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1023,8 +1025,11 @@ GetParentNode:
|
|||
iPage != nDriverPages;
|
||||
iPage++)
|
||||
{
|
||||
PropSheet_AddPage(hPropSheetDlg,
|
||||
dap->DevPropSheets[iPage]);
|
||||
if (PropSheet_AddPage(hPropSheetDlg,
|
||||
dap->DevPropSheets[iPage]))
|
||||
{
|
||||
RecalcPages = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
dap->FreeDevPropSheets = TRUE;
|
||||
|
@ -1057,6 +1062,7 @@ GetParentNode:
|
|||
dap->DevPropSheets[iPage]))
|
||||
{
|
||||
iPage++;
|
||||
RecalcPages = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1070,6 +1076,11 @@ GetParentNode:
|
|||
dap->nDevPropSheets = 0;
|
||||
}
|
||||
|
||||
if (RecalcPages)
|
||||
{
|
||||
PropSheet_RecalcPageSizes(hPropSheetDlg);
|
||||
}
|
||||
|
||||
/* finally, disable the apply button */
|
||||
PropSheet_UnChanged(hPropSheetDlg,
|
||||
hwndDlg);
|
||||
|
|
|
@ -307,6 +307,7 @@ int WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
|
|||
#define PropSheet_SetTitle(d,w,s) SendMessage(d,PSM_SETTITLE,w,(LPARAM)s)
|
||||
#define PropSheet_SetWizButtons(d,f) PostMessage(d,PSM_SETWIZBUTTONS,0,(LPARAM)f)
|
||||
#define PropSheet_UnChanged(d,w) SendMessage(d,PSM_UNCHANGED,(WPARAM)w,0)
|
||||
#define PropSheet_RecalcPageSizes(d) SendMessage(d,PSM_RECALCPAGESIZES,0,0)
|
||||
#endif
|
||||
|
||||
#define WC_PROPSHEETA "SysPropertySheet"
|
||||
|
|
Loading…
Reference in a new issue