Author: weiden
Date: Sat Sep 30 20:31:35 2006
New Revision: 24319
URL:
http://svn.reactos.org/svn/reactos?rev=24319&view=rev
Log:
Recalculate property sheet sizes after adding/removing sheets.
Modified:
trunk/reactos/dll/win32/devmgr/advprop.c
trunk/reactos/include/psdk/prsht.h
Modified: trunk/reactos/dll/win32/devmgr/advprop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/advprop.c…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/advprop.c (original)
+++ trunk/reactos/dll/win32/devmgr/advprop.c Sat Sep 30 20:31:35 2006
@@ -593,6 +593,7 @@
PSP_DEVINFO_DATA DeviceInfoData = NULL;
PROPSHEETHEADER psh;
DWORD nDriverPages = 0;
+ BOOL RecalcPages = FALSE;
hPropSheetDlg = GetParent(hwndDlg);
@@ -614,6 +615,7 @@
PropSheet_RemovePage(hPropSheetDlg,
(WPARAM) -1,
dap->DevPropSheets[iPage]);
+ RecalcPages = TRUE;
}
}
}
@@ -1023,8 +1025,11 @@
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 @@
dap->DevPropSheets[iPage]))
{
iPage++;
+ RecalcPages = TRUE;
}
else
{
@@ -1068,6 +1074,11 @@
}
else
dap->nDevPropSheets = 0;
+ }
+
+ if (RecalcPages)
+ {
+ PropSheet_RecalcPageSizes(hPropSheetDlg);
}
/* finally, disable the apply button */
Modified: trunk/reactos/include/psdk/prsht.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/prsht.h?rev=2…
==============================================================================
--- trunk/reactos/include/psdk/prsht.h (original)
+++ trunk/reactos/include/psdk/prsht.h Sat Sep 30 20:31:35 2006
@@ -307,6 +307,7 @@
#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"