3 * Copyright (C) 2004 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 /* $Id: wizard.c,v 1.12 2004/11/11 12:23:43 ekohl Exp $
21 * COPYRIGHT: See COPYING in the top level directory
22 * PROJECT: ReactOS system libraries
23 * PURPOSE: System setup
24 * FILE: lib/syssetup/wizard.c
25 * PROGRAMER: Eric Kohl
28 /* INCLUDES *****************************************************************/
44 /* GLOBALS ******************************************************************/
46 static SETUPDATA SetupData
;
49 /* FUNCTIONS ****************************************************************/
52 CenterWindow(HWND hWnd
)
58 hWndParent
= GetParent(hWnd
);
59 if (hWndParent
== NULL
)
60 hWndParent
= GetDesktopWindow();
62 GetWindowRect(hWndParent
, &rcParent
);
63 GetWindowRect(hWnd
, &rcWindow
);
67 ((rcParent
.right
- rcParent
.left
) - (rcWindow
.right
- rcWindow
.left
)) / 2,
68 ((rcParent
.bottom
- rcParent
.top
) - (rcWindow
.bottom
- rcWindow
.top
)) / 2,
84 ncm
.cbSize
= sizeof(NONCLIENTMETRICS
);
85 SystemParametersInfo(SPI_GETNONCLIENTMETRICS
, 0, &ncm
, 0);
87 LogFont
= ncm
.lfMessageFont
;
88 LogFont
.lfWeight
= FW_BOLD
;
89 _tcscpy(LogFont
.lfFaceName
, TEXT("MS Shell Dlg"));
93 LogFont
.lfHeight
= 0 - GetDeviceCaps (hdc
, LOGPIXELSY
) * FontSize
/ 72;
94 hFont
= CreateFontIndirect(&LogFont
);
102 WelcomeDlgProc(HWND hwndDlg
,
111 PSETUPDATA SetupData
;
115 /* Get pointer to the global setup data */
116 SetupData
= (PSETUPDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
118 hwndControl
= GetParent(hwndDlg
);
120 /* Center the wizard window */
121 CenterWindow (hwndControl
);
123 /* Hide the system menu */
124 dwStyle
= GetWindowLong(hwndControl
, GWL_STYLE
);
125 SetWindowLong(hwndControl
, GWL_STYLE
, dwStyle
& ~WS_SYSMENU
);
127 /* Hide and disable the 'Cancel' button */
128 hwndControl
= GetDlgItem(GetParent(hwndDlg
), IDCANCEL
);
129 ShowWindow (hwndControl
, SW_HIDE
);
130 EnableWindow (hwndControl
, FALSE
);
133 SendDlgItemMessage(hwndDlg
,
136 (WPARAM
)SetupData
->hTitleFont
,
144 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
149 /* Enable the Next button */
150 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_NEXT
);
168 OwnerPageDlgProc(HWND hwndDlg
,
174 TCHAR OwnerOrganization
[51];
182 SendDlgItemMessage(hwndDlg
, IDC_OWNERNAME
, EM_LIMITTEXT
, 50, 0);
183 SendDlgItemMessage(hwndDlg
, IDC_OWNERORGANIZATION
, EM_LIMITTEXT
, 50, 0);
185 /* Set focus to owner name */
186 SetFocus(GetDlgItem(hwndDlg
, IDC_OWNERNAME
));
193 lpnm
= (LPNMHDR
)lParam
;
198 /* Enable the Back and Next buttons */
199 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_BACK
| PSWIZB_NEXT
);
204 if (GetDlgItemText(hwndDlg
, IDC_OWNERNAME
, OwnerName
, 50) == 0)
207 _T("Setup cannot continue until you enter your name."),
209 MB_ICONERROR
| MB_OK
);
210 SetWindowLong(hwndDlg
, DWL_MSGRESULT
, -1);
214 OwnerOrganization
[0] = 0;
215 GetDlgItemText(hwndDlg
, IDC_OWNERORGANIZATION
, OwnerOrganization
, 50);
217 RegOpenKeyEx(HKEY_LOCAL_MACHINE
,
218 _T("Software\\Microsoft\\Windows NT\\CurrentVersion"),
222 /* FIXME: check error code */
225 _T("RegisteredOwner"),
229 (_tcslen(OwnerName
) + 1) * sizeof(TCHAR
));
230 /* FIXME: check error code */
233 _T("RegisteredOrganization"),
237 (_tcslen(OwnerOrganization
) + 1) * sizeof(TCHAR
));
238 /* FIXME: check error code */
258 ComputerPageDlgProc(HWND hwndDlg
,
263 TCHAR ComputerName
[MAX_COMPUTERNAME_LENGTH
+ 1];
273 /* Retrieve current computer name */
274 Length
= MAX_COMPUTERNAME_LENGTH
+ 1;
275 GetComputerName(ComputerName
, &Length
);
277 /* Display current computer name */
278 SetDlgItemText(hwndDlg
, IDC_COMPUTERNAME
, ComputerName
);
280 /* Set text limits */
281 SendDlgItemMessage(hwndDlg
, IDC_COMPUTERNAME
, EM_LIMITTEXT
, 64, 0);
282 SendDlgItemMessage(hwndDlg
, IDC_ADMINPASSWORD1
, EM_LIMITTEXT
, 14, 0);
283 SendDlgItemMessage(hwndDlg
, IDC_ADMINPASSWORD2
, EM_LIMITTEXT
, 14, 0);
285 /* Set focus to computer name */
286 SetFocus(GetDlgItem(hwndDlg
, IDC_COMPUTERNAME
));
293 lpnm
= (LPNMHDR
)lParam
;
298 /* Enable the Back and Next buttons */
299 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_BACK
| PSWIZB_NEXT
);
303 if (GetDlgItemText(hwndDlg
, IDC_COMPUTERNAME
, ComputerName
, 64) == 0)
306 _T("Setup cannot continue until you enter the name of your computer."),
308 MB_ICONERROR
| MB_OK
);
309 SetWindowLong(hwndDlg
, DWL_MSGRESULT
, -1);
313 /* FIXME: check computer name for invalid characters */
315 if (!SetComputerName(ComputerName
))
318 _T("Setup failed to set the computer name."),
320 MB_ICONERROR
| MB_OK
);
321 SetWindowLong(hwndDlg
, DWL_MSGRESULT
, -1);
325 /* Check admin passwords */
326 GetDlgItemText(hwndDlg
, IDC_ADMINPASSWORD1
, Password1
, 15);
327 GetDlgItemText(hwndDlg
, IDC_ADMINPASSWORD2
, Password2
, 15);
328 if (_tcscmp(Password1
, Password2
))
331 _T("The passwords you entered do not match. Please enter "\
332 "the desired password again."),
334 MB_ICONERROR
| MB_OK
);
335 SetWindowLong(hwndDlg
, DWL_MSGRESULT
, -1);
339 /* FIXME: check password for invalid characters */
341 /* FIXME: Set admin password */
359 SetKeyboardLayoutName(HWND hwnd
)
362 WCHAR szLayoutPath
[256];
363 WCHAR szLocaleName
[32];
367 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE
,
368 L
"SYSTEM\\CurrentControlSet\\Control\\NLS\\Locale",
374 dwValueSize
= 16 * sizeof(WCHAR
);
375 if (RegQueryValueExW(hKey
,
387 L
"SYSTEM\\CurrentControlSet\\Control\\KeyboardLayouts\\"
391 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE
,
398 dwValueSize
= 32 * sizeof(WCHAR
);
399 if (RegQueryValueExW(hKey
,
420 // TCHAR Caption[256];
422 hDll
= LoadLibraryW(L
"intl.cpl");
424 ZeroMemory(&psp
, sizeof(PROPSHEETPAGE
));
425 psp
.dwSize
= sizeof(PROPSHEETPAGE
);
426 psp
.dwFlags
= PSP_DEFAULT
;
427 psp
.hInstance
= hDll
;
428 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_LOCALEPAGE
);
429 psp
.pfnDlgProc
= GetProcAddress(hDll
, "LocalePageProc");
432 // LoadString(hDll, IDS_CPLNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
434 ZeroMemory(&psh
, sizeof(PROPSHEETHEADER
));
435 psh
.dwSize
= sizeof(PROPSHEETHEADER
);
436 psh
.dwFlags
= PSH_PROPSHEETPAGE
; // | PSH_PROPTITLE;
437 psh
.hwndParent
= NULL
;
438 psh
.hInstance
= hDll
;
439 // psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDC_CPLICON));
440 // psh.pszCaption = Caption;
452 LocalePageDlgProc(HWND hwndDlg
,
457 PSETUPDATA SetupData
;
459 /* Retrieve pointer to the global setup data */
460 SetupData
= (PSETUPDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
466 /* Save pointer to the global setup data */
467 SetupData
= (PSETUPDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
468 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)SetupData
);
471 SetKeyboardLayoutName(GetDlgItem(hwndDlg
, IDC_LAYOUTTEXT
));
477 if (HIWORD(wParam
) == BN_CLICKED
)
479 switch (LOWORD(wParam
))
481 case IDC_CUSTOMLOCALE
:
492 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
497 /* Enable the Back and Next buttons */
498 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_BACK
| PSWIZB_NEXT
);
518 static PTIMEZONE_ENTRY
519 GetLargerTimeZoneEntry(PSETUPDATA SetupData
, DWORD Index
)
521 PTIMEZONE_ENTRY Entry
;
523 Entry
= SetupData
->TimeZoneListHead
;
524 while (Entry
!= NULL
)
526 if (Entry
->Index
>= Index
)
537 CreateTimeZoneList(PSETUPDATA SetupData
)
539 WCHAR szKeyName
[256];
547 PTIMEZONE_ENTRY Entry
;
548 PTIMEZONE_ENTRY Current
;
550 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE
,
551 L
"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones",
561 lError
= RegEnumKeyExW(hZonesKey
,
569 if (lError
!= ERROR_SUCCESS
&& lError
!= ERROR_MORE_DATA
)
572 if (RegOpenKeyExW(hZonesKey
,
579 Entry
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(TIMEZONE_ENTRY
));
582 RegCloseKey(hZoneKey
);
586 dwValueSize
= 64 * sizeof(WCHAR
);
587 if (RegQueryValueExW(hZoneKey
,
591 (LPBYTE
)&Entry
->Description
,
594 RegCloseKey(hZoneKey
);
598 dwValueSize
= 32 * sizeof(WCHAR
);
599 if (RegQueryValueExW(hZoneKey
,
603 (LPBYTE
)&Entry
->StandardName
,
606 RegCloseKey(hZoneKey
);
610 dwValueSize
= 32 * sizeof(WCHAR
);
611 if (RegQueryValueExW(hZoneKey
,
615 (LPBYTE
)&Entry
->DaylightName
,
618 RegCloseKey(hZoneKey
);
622 dwValueSize
= sizeof(DWORD
);
623 if (RegQueryValueExW(hZoneKey
,
627 (LPBYTE
)&Entry
->Index
,
630 RegCloseKey(hZoneKey
);
634 dwValueSize
= sizeof(TZ_INFO
);
635 if (RegQueryValueExW(hZoneKey
,
639 (LPBYTE
)&Entry
->TimezoneInfo
,
642 RegCloseKey(hZoneKey
);
646 RegCloseKey(hZoneKey
);
648 if (SetupData
->TimeZoneListHead
== NULL
&&
649 SetupData
->TimeZoneListTail
== NULL
)
653 SetupData
->TimeZoneListHead
= Entry
;
654 SetupData
->TimeZoneListTail
= Entry
;
658 Current
= GetLargerTimeZoneEntry(SetupData
, Entry
->Index
);
661 if (Current
== SetupData
->TimeZoneListHead
)
663 /* Prepend to head */
665 Entry
->Next
= SetupData
->TimeZoneListHead
;
666 SetupData
->TimeZoneListHead
->Prev
= Entry
;
667 SetupData
->TimeZoneListHead
= Entry
;
671 /* Insert before current */
672 Entry
->Prev
= Current
->Prev
;
673 Entry
->Next
= Current
;
674 Current
->Prev
->Next
= Entry
;
675 Current
->Prev
= Entry
;
681 Entry
->Prev
= SetupData
->TimeZoneListTail
;
683 SetupData
->TimeZoneListTail
->Next
= Entry
;
684 SetupData
->TimeZoneListTail
= Entry
;
691 RegCloseKey(hZonesKey
);
696 DestroyTimeZoneList(PSETUPDATA SetupData
)
698 PTIMEZONE_ENTRY Entry
;
700 while (SetupData
->TimeZoneListHead
!= NULL
)
702 Entry
= SetupData
->TimeZoneListHead
;
704 SetupData
->TimeZoneListHead
= Entry
->Next
;
705 if (SetupData
->TimeZoneListHead
!= NULL
)
707 SetupData
->TimeZoneListHead
->Prev
= NULL
;
710 HeapFree(GetProcessHeap(), 0, Entry
);
713 SetupData
->TimeZoneListTail
= NULL
;
718 ShowTimeZoneList(HWND hwnd
, PSETUPDATA SetupData
)
720 PTIMEZONE_ENTRY Entry
;
722 Entry
= SetupData
->TimeZoneListHead
;
723 while (Entry
!= NULL
)
728 (LPARAM
)Entry
->Description
);
742 SetLocalTimeZone(HWND hwnd
, PSETUPDATA SetupData
)
744 TIME_ZONE_INFORMATION TimeZoneInformation
;
745 PTIMEZONE_ENTRY Entry
;
749 dwIndex
= SendMessage(hwnd
,
755 Entry
= SetupData
->TimeZoneListHead
;
765 wcscpy(TimeZoneInformation
.StandardName
,
766 Entry
->StandardName
);
767 wcscpy(TimeZoneInformation
.DaylightName
,
768 Entry
->DaylightName
);
770 TimeZoneInformation
.Bias
= Entry
->TimezoneInfo
.Bias
;
771 TimeZoneInformation
.StandardBias
= Entry
->TimezoneInfo
.StandardBias
;
772 TimeZoneInformation
.DaylightBias
= Entry
->TimezoneInfo
.DaylightBias
;
774 memcpy(&TimeZoneInformation
.StandardDate
,
775 &Entry
->TimezoneInfo
.StandardDate
,
777 memcpy(&TimeZoneInformation
.DaylightDate
,
778 &Entry
->TimezoneInfo
.DaylightDate
,
781 /* Set time zone information */
782 SetTimeZoneInformation(&TimeZoneInformation
);
787 GetLocalSystemTime(HWND hwnd
, PSETUPDATA SetupData
)
792 if (DateTime_GetSystemTime(GetDlgItem(hwnd
, IDC_DATEPICKER
), &Date
) != GDT_VALID
)
797 if (DateTime_GetSystemTime(GetDlgItem(hwnd
, IDC_TIMEPICKER
), &Time
) != GDT_VALID
)
802 SetupData
->SystemTime
.wYear
= Date
.wYear
;
803 SetupData
->SystemTime
.wMonth
= Date
.wMonth
;
804 SetupData
->SystemTime
.wDayOfWeek
= Date
.wDayOfWeek
;
805 SetupData
->SystemTime
.wDay
= Date
.wDay
;
806 SetupData
->SystemTime
.wHour
= Time
.wHour
;
807 SetupData
->SystemTime
.wMinute
= Time
.wMinute
;
808 SetupData
->SystemTime
.wSecond
= Time
.wSecond
;
809 SetupData
->SystemTime
.wMilliseconds
= Time
.wMilliseconds
;
816 SetAutoDaylightInfo(HWND hwnd
)
821 if (SendMessage(hwnd
, BM_GETCHECK
, 0, 0) == BST_UNCHECKED
)
823 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE
,
824 L
"SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation",
831 L
"DisableAutoDaylightTimeSet",
842 DateTimePageDlgProc(HWND hwndDlg
,
847 PSETUPDATA SetupData
;
849 /* Retrieve pointer to the global setup data */
850 SetupData
= (PSETUPDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
856 /* Save pointer to the global setup data */
857 SetupData
= (PSETUPDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
858 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)SetupData
);
860 CreateTimeZoneList(SetupData
);
862 ShowTimeZoneList(GetDlgItem(hwndDlg
, IDC_TIMEZONELIST
),
865 SendDlgItemMessage(hwndDlg
, IDC_AUTODAYLIGHT
, BM_SETCHECK
, (WPARAM
)BST_CHECKED
, 0);
872 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
877 /* Enable the Back and Next buttons */
878 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_BACK
| PSWIZB_NEXT
);
883 GetLocalSystemTime(hwndDlg
, SetupData
);
884 SetLocalTimeZone(GetDlgItem(hwndDlg
, IDC_TIMEZONELIST
),
886 SetAutoDaylightInfo(GetDlgItem(hwndDlg
, IDC_AUTODAYLIGHT
));
887 SetLocalTime(&SetupData
->SystemTime
);
898 DestroyTimeZoneList(SetupData
);
910 ProcessPageDlgProc(HWND hwndDlg
,
915 PSETUPDATA SetupData
;
917 /* Retrieve pointer to the global setup data */
918 SetupData
= (PSETUPDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
924 /* Save pointer to the global setup data */
925 SetupData
= (PSETUPDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
926 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)SetupData
);
935 hWndProgress
= GetDlgItem(hwndDlg
, IDC_PROCESSPROGRESS
);
936 Position
= SendMessage(hWndProgress
, PBM_GETPOS
, 0, 0);
939 PropSheet_PressButton(GetParent(hwndDlg
), PSBTN_NEXT
);
943 SendMessage(hWndProgress
, PBM_SETPOS
, Position
+ 1, 0);
950 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
955 /* Disable the Back and Next buttons */
956 PropSheet_SetWizButtons(GetParent(hwndDlg
), 0);
958 SendDlgItemMessage(hwndDlg
, IDC_PROCESSPROGRESS
, PBM_SETRANGE
, 0,
960 SetTimer(hwndDlg
, 0, 50, NULL
);
965 /* Enable the Back and Next buttons */
966 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_BACK
| PSWIZB_NEXT
);
985 FinishDlgProc(HWND hwndDlg
,
995 PSETUPDATA SetupData
;
997 /* Get pointer to the global setup data */
998 SetupData
= (PSETUPDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
1000 /* Set title font */
1001 SendDlgItemMessage(hwndDlg
,
1004 (WPARAM
)SetupData
->hTitleFont
,
1011 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
1016 /* Enable the correct buttons on for the active page */
1017 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_BACK
| PSWIZB_FINISH
);
1021 /* Handle a Back button click, if necessary */
1025 /* Handle a Finish button click, if necessary */
1045 PROPSHEETHEADER psh
;
1046 HPROPSHEETPAGE ahpsp
[6];
1049 /* Clear setup data */
1050 ZeroMemory(&SetupData
, sizeof(SETUPDATA
));
1052 /* Create the Welcome page */
1053 ZeroMemory (&psp
, sizeof(PROPSHEETPAGE
));
1054 psp
.dwSize
= sizeof(PROPSHEETPAGE
);
1055 psp
.dwFlags
= PSP_DEFAULT
| PSP_HIDEHEADER
;
1056 psp
.hInstance
= hDllInstance
;
1057 psp
.lParam
= (LPARAM
)&SetupData
;
1058 psp
.pfnDlgProc
= WelcomeDlgProc
;
1059 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_WELCOMEPAGE
);
1060 ahpsp
[0] = CreatePropertySheetPage(&psp
);
1062 /* Create the Owner page */
1063 psp
.dwFlags
= PSP_DEFAULT
| PSP_USEHEADERTITLE
| PSP_USEHEADERSUBTITLE
;
1064 psp
.pszHeaderTitle
= MAKEINTRESOURCE(IDS_OWNERTITLE
);
1065 psp
.pszHeaderSubTitle
= MAKEINTRESOURCE(IDS_OWNERSUBTITLE
);
1066 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_OWNERPAGE
);
1067 psp
.pfnDlgProc
= OwnerPageDlgProc
;
1068 ahpsp
[1] = CreatePropertySheetPage(&psp
);
1070 /* Create the Computer page */
1071 psp
.dwFlags
= PSP_DEFAULT
| PSP_USEHEADERTITLE
| PSP_USEHEADERSUBTITLE
;
1072 psp
.pszHeaderTitle
= MAKEINTRESOURCE(IDS_COMPUTERTITLE
);
1073 psp
.pszHeaderSubTitle
= MAKEINTRESOURCE(IDS_COMPUTERSUBTITLE
);
1074 psp
.pfnDlgProc
= ComputerPageDlgProc
;
1075 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_COMPUTERPAGE
);
1076 ahpsp
[2] = CreatePropertySheetPage(&psp
);
1079 /* Create the Locale page */
1080 psp
.dwFlags
= PSP_DEFAULT
| PSP_USEHEADERTITLE
| PSP_USEHEADERSUBTITLE
;
1081 psp
.pszHeaderTitle
= MAKEINTRESOURCE(IDS_LOCALETITLE
);
1082 psp
.pszHeaderSubTitle
= MAKEINTRESOURCE(IDS_LOCALESUBTITLE
);
1083 psp
.pfnDlgProc
= LocalePageDlgProc
;
1084 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_LOCALEPAGE
);
1085 ahpsp
[3] = CreatePropertySheetPage(&psp
);
1088 /* Create the DateTime page */
1089 psp
.dwFlags
= PSP_DEFAULT
| PSP_USEHEADERTITLE
| PSP_USEHEADERSUBTITLE
;
1090 psp
.pszHeaderTitle
= MAKEINTRESOURCE(IDS_DATETIMETITLE
);
1091 psp
.pszHeaderSubTitle
= MAKEINTRESOURCE(IDS_DATETIMESUBTITLE
);
1092 psp
.pfnDlgProc
= DateTimePageDlgProc
;
1093 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_DATETIMEPAGE
);
1094 ahpsp
[4] = CreatePropertySheetPage(&psp
);
1097 /* Create the Process page */
1098 psp
.dwFlags
= PSP_DEFAULT
| PSP_USEHEADERTITLE
| PSP_USEHEADERSUBTITLE
;
1099 psp
.pszHeaderTitle
= MAKEINTRESOURCE(IDS_PROCESSTITLE
);
1100 psp
.pszHeaderSubTitle
= MAKEINTRESOURCE(IDS_PROCESSSUBTITLE
);
1101 psp
.pfnDlgProc
= ProcessPageDlgProc
;
1102 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_PROCESSPAGE
);
1103 ahpsp
[5] = CreatePropertySheetPage(&psp
);
1106 /* Create the Finish page */
1107 psp
.dwFlags
= PSP_DEFAULT
| PSP_HIDEHEADER
;
1108 psp
.pfnDlgProc
= FinishDlgProc
;
1109 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_FINISHPAGE
);
1110 ahpsp
[6] = CreatePropertySheetPage(&psp
);
1112 /* Create the property sheet */
1113 psh
.dwSize
= sizeof(PROPSHEETHEADER
);
1114 psh
.dwFlags
= PSH_WIZARD97
| PSH_WATERMARK
| PSH_HEADER
;
1115 psh
.hInstance
= hDllInstance
;
1116 psh
.hwndParent
= NULL
;
1120 psh
.pszbmWatermark
= MAKEINTRESOURCE(IDB_WATERMARK
);
1121 psh
.pszbmHeader
= MAKEINTRESOURCE(IDB_HEADER
);
1123 /* Create title font */
1124 SetupData
.hTitleFont
= CreateTitleFont();
1126 /* Display the wizard */
1127 PropertySheet(&psh
);
1129 DeleteObject(SetupData
.hTitleFont
);