Author: hpoussin
Date: Mon May 29 00:21:43 2006
New Revision: 22092
URL:
http://svn.reactos.ru/svn/reactos?rev=22092&view=rev
Log:
- Display install page when installing the device, instead of search page
- Add "install failed" page
Modified:
trunk/reactos/dll/win32/newdev/De.rc
trunk/reactos/dll/win32/newdev/En.rc
trunk/reactos/dll/win32/newdev/Es.rc
trunk/reactos/dll/win32/newdev/Hu.rc
trunk/reactos/dll/win32/newdev/Ru.rc
trunk/reactos/dll/win32/newdev/newdev.h
trunk/reactos/dll/win32/newdev/resource.h
trunk/reactos/dll/win32/newdev/wizard.c
Modified: trunk/reactos/dll/win32/newdev/De.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/De.rc?rev=…
==============================================================================
--- trunk/reactos/dll/win32/newdev/De.rc (original)
+++ trunk/reactos/dll/win32/newdev/De.rc Mon May 29 00:21:43 2006
@@ -30,6 +30,18 @@
IDC_STATIC,120,98,181,24
CONTROL "Diesen Dialog nicht mehr
anzeigen",IDC_DONOTSHOWDLG,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11
+END
+
+IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193
+STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION |
+ WS_SYSMENU
+CAPTION "Device installation"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24
+ LTEXT "The device could not be installed because an unexpected error
happened.",
+ IDC_STATIC,120,40,195,19
+ LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11
END
IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143
Modified: trunk/reactos/dll/win32/newdev/En.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/En.rc?rev=…
==============================================================================
--- trunk/reactos/dll/win32/newdev/En.rc (original)
+++ trunk/reactos/dll/win32/newdev/En.rc Mon May 29 00:21:43 2006
@@ -30,6 +30,18 @@
IDC_STATIC,120,98,181,24
CONTROL "Do not show this dialog
anymore",IDC_DONOTSHOWDLG,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11
+END
+
+IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193
+STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION |
+ WS_SYSMENU
+CAPTION "Device installation"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24
+ LTEXT "The device could not be installed because an unexpected error
happened.",
+ IDC_STATIC,120,40,195,19
+ LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11
END
IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143
Modified: trunk/reactos/dll/win32/newdev/Es.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/Es.rc?rev=…
==============================================================================
--- trunk/reactos/dll/win32/newdev/Es.rc (original)
+++ trunk/reactos/dll/win32/newdev/Es.rc Mon May 29 00:21:43 2006
@@ -30,6 +30,18 @@
IDC_STATIC,120,98,181,24
CONTROL "No volver a mostrar esta
ventana",IDC_DONOTSHOWDLG,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11
+END
+
+IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193
+STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION |
+ WS_SYSMENU
+CAPTION "Device installation"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24
+ LTEXT "The device could not be installed because an unexpected error
happened.",
+ IDC_STATIC,120,40,195,19
+ LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11
END
IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143
Modified: trunk/reactos/dll/win32/newdev/Hu.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/Hu.rc?rev=…
==============================================================================
--- trunk/reactos/dll/win32/newdev/Hu.rc (original)
+++ trunk/reactos/dll/win32/newdev/Hu.rc Mon May 29 00:21:43 2006
@@ -8,11 +8,14 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "welcome??",IDC_WELCOMETITLE,115,8,195,24
- LTEXT "A telepítõ a következõ hardverhez telepít fel
eszközmeghatjtót:",IDC_STATIC,115,40,195,16
+ LTEXT "A telepítõ a következõ hardverhez telepít fel
eszközmeghatjtót:",
+ IDC_STATIC,120,40,195,16
LTEXT "Kattints a Tovább gombra a
folytatáshoz.",IDC_STATIC,115,169,195,17
LTEXT "Ismeretlen eszköz!",IDC_DEVICE,129,55,164,11
- CONTROL "Automatikus
telepítés",IDC_RADIO_AUTO,"Button",BS_AUTORADIOBUTTON,115,112,178,13
- CONTROL "Eszközmeghajtó
kiválasztása",IDC_RADIO_MANUAL,"Button",BS_AUTORADIOBUTTON,115,133,164,14
+ CONTROL "Automatikus telepítés",IDC_RADIO_AUTO,"Button",
+ BS_AUTORADIOBUTTON,120,112,178,13
+ CONTROL "Eszközmeghajtó kiválasztása",IDC_RADIO_MANUAL,
+ "Button",BS_AUTORADIOBUTTON,120,133,164,14
END
IDD_NODRIVER DIALOG DISCARDABLE 0, 0, 317, 193
@@ -22,9 +25,24 @@
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "A telepítés sikertelen.",IDC_FINISHTITLE,115,8,195,24
- LTEXT "Az eszközmeghajtó nem
található.",IDC_STATIC,115,40,195,19
- LTEXT "Kattints a Vissza gombra, és az Eszközmeghajtó kiválasztása
gombra, ha tudod, hol van az eszközmeghajtó.",IDC_STATIC,113,98,181,24
- CONTROL "Ne mutasd ezt
többször",IDC_DONOTSHOWDLG,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,114,170,180,11
+ LTEXT "Az eszközmeghajtó nem található.",
+ IDC_STATIC,120,40,195,19
+ LTEXT "Kattints a Vissza gombra, és az Eszközmeghajtó kiválasztása
gombra, ha tudod, hol van az eszközmeghajtó.",
+ IDC_STATIC,120,98,181,24
+ CONTROL "Ne mutasd ezt
többször",IDC_DONOTSHOWDLG,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11
+END
+
+IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193
+STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION |
+ WS_SYSMENU
+CAPTION "Device installation"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24
+ LTEXT "The device could not be installed because an unexpected error
happened.",
+ IDC_STATIC,120,40,195,19
+ LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11
END
IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143
@@ -32,12 +50,17 @@
CAPTION "Hardver telepítõ"
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "Keresés ezeken a
helyeken",IDC_RADIO_SEARCHHERE,"Button",BS_AUTORADIOBUTTON,27,11,239,13
- CONTROL "Eszközmeghajtó
kiválasztása",IDC_RADIO_CHOOSE,"Button",BS_AUTORADIOBUTTON,27,98,171,12
- CONTROL "Keresés cserélhetõ
lemezeken",IDC_CHECK_MEDIA,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,47,33,163,9
- CONTROL "A következõ útvonalon
keressen",IDC_CHECK_PATH,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,47,54,162,10
+ CONTROL "Keresés ezeken a
helyeken",IDC_RADIO_SEARCHHERE,"Button",
+ BS_AUTORADIOBUTTON,27,11,239,13
+ CONTROL "Eszközmeghajtó
kiválasztása",IDC_RADIO_CHOOSE,"Button",
+ BS_AUTORADIOBUTTON,27,98,171,12
+ CONTROL "Keresés cserélhetõ
lemezeken",IDC_CHECK_MEDIA,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,47,33,163,9
+ CONTROL "A következõ útvonalon
keressen",IDC_CHECK_PATH,"Button",
+ WS_TABSTOP,47,54,162,10
PUSHBUTTON "Böngészés",IDC_BROWSE,248,69,45,14
- COMBOBOX IDC_COMBO_PATH,61,71,176,12,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL |
WS_TABSTOP | CBS_AUTOHSCROLL
+ COMBOBOX IDC_COMBO_PATH,61,71,176,12,CBS_DROPDOWN | CBS_SORT |
+ WS_VSCROLL | WS_TABSTOP | CBS_AUTOHSCROLL
END
IDD_SEARCHDRV DIALOG DISCARDABLE 0, 0, 317, 143
@@ -62,9 +85,11 @@
CAPTION "Hardver telepítõ"
FONT 8, "MS Shell Dlg"
BEGIN
- LTEXT "A telepítés sikeresen
befejezõdött",IDC_FINISHTITLE,115,8,195,11
- LTEXT "A telepítõ feltelepítette az eszközmeghajtókat a következõ
eszközhöz:",IDC_STATIC,115,32,195,19
- LTEXT "A kilépéshez kattints a Befejezés
gombra.",IDC_STATIC,115,174,179,11
+ LTEXT "A telepítés sikeresen
befejezõdött",IDC_FINISHTITLE,120,8,195,11
+ LTEXT "A telepítõ feltelepítette az eszközmeghajtókat a következõ
eszközhöz:",
+ IDC_STATIC,120,32,195,19
+ LTEXT "A kilépéshez kattints a Befejezés
gombra.",IDC_STATIC,120,174,
+ 179,11
LTEXT "Ismeretlen eszköz!",IDC_DEVICE,148,53,147,12
END
Modified: trunk/reactos/dll/win32/newdev/Ru.rc
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/Ru.rc?rev=…
==============================================================================
--- trunk/reactos/dll/win32/newdev/Ru.rc (original)
+++ trunk/reactos/dll/win32/newdev/Ru.rc Mon May 29 00:21:43 2006
@@ -30,6 +30,18 @@
IDC_STATIC,120,98,181,24
CONTROL "Íå ïîêàçûâàòü ýòîò äèàëîã â
áóäóùåì",IDC_DONOTSHOWDLG,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11
+END
+
+IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193
+STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION |
+ WS_SYSMENU
+CAPTION "Device installation"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24
+ LTEXT "The device could not be installed because an unexpected error
happened.",
+ IDC_STATIC,120,40,195,19
+ LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11
END
IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143
Modified: trunk/reactos/dll/win32/newdev/newdev.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/newdev.h?r…
==============================================================================
--- trunk/reactos/dll/win32/newdev/newdev.h (original)
+++ trunk/reactos/dll/win32/newdev/newdev.h Mon May 29 00:21:43 2006
@@ -27,7 +27,8 @@
LPTSTR CustomSearchPath; /* MULTI_SZ string */
} DEVINSTDATA, *PDEVINSTDATA;
-#define WM_SEARCH_FINISHED (WM_USER + 10)
+#define WM_SEARCH_FINISHED (WM_USER + 10)
+#define WM_INSTALL_FINISHED (WM_USER + 11)
/* newdev.c */
BOOL
Modified: trunk/reactos/dll/win32/newdev/resource.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/resource.h…
==============================================================================
--- trunk/reactos/dll/win32/newdev/resource.h (original)
+++ trunk/reactos/dll/win32/newdev/resource.h Mon May 29 00:21:43 2006
@@ -24,6 +24,7 @@
#define IDD_SEARCHDRV 2
#define IDD_INSTALLDRV 3
#define IDD_NODRIVER 4
-#define IDD_FINISHPAGE 5
+#define IDD_INSTALLFAILED 5
+#define IDD_FINISHPAGE 6
#endif /* RESOURCE_H */
Modified: trunk/reactos/dll/win32/newdev/wizard.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/wizard.c?r…
==============================================================================
--- trunk/reactos/dll/win32/newdev/wizard.c (original)
+++ trunk/reactos/dll/win32/newdev/wizard.c Mon May 29 00:21:43 2006
@@ -335,6 +335,19 @@
return 0;
}
+static DWORD WINAPI
+InstallDriverProc(
+ IN LPVOID lpParam)
+{
+ PDEVINSTDATA DevInstData;
+ BOOL res;
+
+ DevInstData = (PDEVINSTDATA)lpParam;
+ res = InstallCurrentDriver(DevInstData);
+ PostMessage(DevInstData->hDialog, WM_INSTALL_FINISHED, res ? 0 : 1, 0);
+ return 0;
+}
+
static VOID
PopulateCustomPathCombo(
IN HWND hwndCombo)
@@ -408,7 +421,7 @@
SaveCustomPath(
IN HWND hwndCombo)
{
- FIXME("Stub.");
+ FIXME("Stub\n");
}
static INT_PTR CALLBACK
@@ -606,7 +619,7 @@
if (PrepareFoldersToScan(DevInstData, hwndDlg))
PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_SEARCHDRV);
else
- /* FIXME: unknown error */;
+ PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_INSTALLFAILED);
}
else
/* FIXME */;
@@ -675,11 +688,7 @@
if (wParam == 0)
PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_NODRIVER);
else
- {
- /* FIXME: Shouldn't belong here... */
- InstallCurrentDriver(DevInstData);
- PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_FINISHPAGE);
- }
+ PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_INSTALLDRV);
break;
}
@@ -726,6 +735,86 @@
IN WPARAM wParam,
IN LPARAM lParam)
{
+ PDEVINSTDATA DevInstData;
+ DWORD dwThreadId;
+
+ /* Retrieve pointer to the global setup data */
+ DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
+
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hwndControl;
+ DWORD dwStyle;
+
+ /* Get pointer to the global setup data */
+ DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam;
+ SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData);
+
+ DevInstData->hDialog = hwndDlg;
+ hwndControl = GetParent(hwndDlg);
+
+ /* Center the wizard window */
+ CenterWindow(hwndControl);
+
+ SendDlgItemMessage(
+ hwndDlg,
+ IDC_DEVICE,
+ WM_SETTEXT,
+ 0,
+ (LPARAM)DevInstData->drvInfoData.Description);
+
+ /* Hide the system menu */
+ dwStyle = GetWindowLong(hwndControl, GWL_STYLE);
+ SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+ break;
+ }
+
+ case WM_INSTALL_FINISHED:
+ {
+ CloseHandle(hThread);
+ hThread = 0;
+ if (wParam == 0)
+ PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_FINISHPAGE);
+ else
+ PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_INSTALLFAILED);
+ break;
+ }
+
+ case WM_NOTIFY:
+ {
+ LPNMHDR lpnm = (LPNMHDR)lParam;
+
+ switch (lpnm->code)
+ {
+ case PSN_SETACTIVE:
+ PropSheet_SetWizButtons(GetParent(hwndDlg), !PSWIZB_NEXT | !PSWIZB_BACK);
+ hThread = CreateThread(NULL, 0, InstallDriverProc, DevInstData, 0,
&dwThreadId);
+ break;
+
+ case PSN_KILLACTIVE:
+ if (hThread != 0)
+ {
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, TRUE);
+ return TRUE;
+ }
+ break;
+
+ case PSN_WIZNEXT:
+ /* Handle a Next button click, if necessary */
+ break;
+
+ default:
+ break;
+ }
+ break;
+ }
+
+ default:
+ break;
+ }
+
return FALSE;
}
@@ -739,7 +828,7 @@
PDEVINSTDATA DevInstData;
/* Get pointer to the global setup data */
- DevInstData = (PDEVINSTDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA);
+ DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
switch (uMsg)
{
@@ -752,8 +841,8 @@
SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData);
hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
- ShowWindow (hwndControl, SW_HIDE);
- EnableWindow (hwndControl, FALSE);
+ ShowWindow(hwndControl, SW_HIDE);
+ EnableWindow(hwndControl, FALSE);
/* Set title font */
SendDlgItemMessage(
@@ -836,6 +925,81 @@
}
static INT_PTR CALLBACK
+InstallFailedDlgProc(
+ IN HWND hwndDlg,
+ IN UINT uMsg,
+ IN WPARAM wParam,
+ IN LPARAM lParam)
+{
+ PDEVINSTDATA DevInstData;
+
+ /* Retrieve pointer to the global setup data */
+ DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
+
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hwndControl;
+
+ /* Get pointer to the global setup data */
+ DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam;
+ SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData);
+
+ hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
+ ShowWindow(hwndControl, SW_HIDE);
+ EnableWindow(hwndControl, FALSE);
+
+ SendDlgItemMessage(
+ hwndDlg,
+ IDC_DEVICE,
+ WM_SETTEXT,
+ 0,
+ (LPARAM)DevInstData->drvInfoData.Description);
+
+ /* Set title font */
+ SendDlgItemMessage(
+ hwndDlg,
+ IDC_FINISHTITLE,
+ WM_SETFONT,
+ (WPARAM)DevInstData->hTitleFont,
+ (LPARAM)TRUE);
+ break;
+ }
+
+ case WM_NOTIFY:
+ {
+ LPNMHDR lpnm = (LPNMHDR)lParam;
+
+ switch (lpnm->code)
+ {
+ case PSN_SETACTIVE:
+ /* Enable the correct buttons on for the active page */
+ PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_FINISH);
+ break;
+
+ case PSN_WIZBACK:
+ /* Handle a Back button click, if necessary */
+ break;
+
+ case PSN_WIZFINISH:
+ /* Handle a Finish button click, if necessary */
+ break;
+
+ default:
+ break;
+ }
+ break;
+ }
+
+ default:
+ break;
+ }
+
+ return FALSE;
+}
+
+static INT_PTR CALLBACK
FinishDlgProc(
IN HWND hwndDlg,
IN UINT uMsg,
@@ -845,7 +1009,7 @@
PDEVINSTDATA DevInstData;
/* Retrieve pointer to the global setup data */
- DevInstData = (PDEVINSTDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA);
+ DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWL_USERDATA);
switch (uMsg)
{
@@ -858,8 +1022,8 @@
SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData);
hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
- ShowWindow (hwndControl, SW_HIDE);
- EnableWindow (hwndControl, FALSE);
+ ShowWindow(hwndControl, SW_HIDE);
+ EnableWindow(hwndControl, FALSE);
SendDlgItemMessage(
hwndDlg,
@@ -973,11 +1137,17 @@
psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLDRV);
ahpsp[IDD_INSTALLDRV] = CreatePropertySheetPage(&psp);
- /* Create the Install failed page */
+ /* Create the No driver page */
psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
psp.pfnDlgProc = NoDriverDlgProc;
psp.pszTemplate = MAKEINTRESOURCE(IDD_NODRIVER);
ahpsp[IDD_NODRIVER] = CreatePropertySheetPage(&psp);
+
+ /* Create the Install failed page */
+ psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
+ psp.pfnDlgProc = InstallFailedDlgProc;
+ psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLFAILED);
+ ahpsp[IDD_INSTALLFAILED] = CreatePropertySheetPage(&psp);
/* Create the Finish page */
psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
@@ -990,7 +1160,7 @@
psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER;
psh.hInstance = hDllInstance;
psh.hwndParent = hwndParent;
- psh.nPages = 6;
+ psh.nPages = IDD_FINISHPAGE + 1;
psh.nStartPage = startPage;
psh.phpage = ahpsp;
psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK);