From deb282d9e133ba98ef6ee9f1910d407c8fc6bcf7 Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Fri, 16 Jan 2009 14:28:07 +0000 Subject: [PATCH] - More dialogs implementation svn path=/trunk/; revision=38789 --- reactos/dll/cpl/hdwwiz/hdwwiz.c | 113 ++++++++++++++++++++++++++- reactos/dll/cpl/hdwwiz/lang/bg-BG.rc | 1 + reactos/dll/cpl/hdwwiz/lang/cs-CZ.rc | 1 + reactos/dll/cpl/hdwwiz/lang/de-DE.rc | 1 + reactos/dll/cpl/hdwwiz/lang/el-GR.rc | 1 + reactos/dll/cpl/hdwwiz/lang/en-US.rc | 1 + reactos/dll/cpl/hdwwiz/lang/es-ES.rc | 1 + reactos/dll/cpl/hdwwiz/lang/fr-FR.rc | 1 + reactos/dll/cpl/hdwwiz/lang/hu-HU.rc | 1 + reactos/dll/cpl/hdwwiz/lang/id-ID.rc | 1 + reactos/dll/cpl/hdwwiz/lang/it-IT.rc | 1 + reactos/dll/cpl/hdwwiz/lang/ja-JP.rc | 1 + reactos/dll/cpl/hdwwiz/lang/nl-NL.rc | 1 + reactos/dll/cpl/hdwwiz/lang/no-NO.rc | 1 + reactos/dll/cpl/hdwwiz/lang/pl-PL.rc | 1 + reactos/dll/cpl/hdwwiz/lang/pt-BR.rc | 1 + reactos/dll/cpl/hdwwiz/lang/ru-RU.rc | 1 + reactos/dll/cpl/hdwwiz/lang/sk-SK.rc | 1 + reactos/dll/cpl/hdwwiz/lang/th-TH.rc | 1 + reactos/dll/cpl/hdwwiz/lang/uk-UA.rc | 1 + reactos/dll/cpl/hdwwiz/lang/zh-CN.rc | 1 + reactos/dll/cpl/hdwwiz/resource.h | 1 + 22 files changed, 133 insertions(+), 1 deletion(-) diff --git a/reactos/dll/cpl/hdwwiz/hdwwiz.c b/reactos/dll/cpl/hdwwiz/hdwwiz.c index 2fb325b8557..dc1cab638e8 100644 --- a/reactos/dll/cpl/hdwwiz/hdwwiz.c +++ b/reactos/dll/cpl/hdwwiz/hdwwiz.c @@ -487,6 +487,35 @@ ProbeListPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) static INT_PTR CALLBACK SelectWayPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { + switch (uMsg) + { + case WM_NOTIFY: + { + LPNMHDR lpnm = (LPNMHDR)lParam; + + switch (lpnm->code) + { + case PSN_SETACTIVE: + { + PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT | PSWIZB_BACK); + SendDlgItemMessage(hwndDlg, IDC_AUTOINSTALL, BM_SETCHECK, 1, 1); + } + break; + + case PSN_WIZNEXT: + { + if (SendDlgItemMessage(hwndDlg, IDC_AUTOINSTALL, BM_GETCHECK, 0, 0) == BST_CHECKED) + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_PROGRESSPAGE); + else + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_HWTYPESPAGE); + + return TRUE; + } + } + } + break; + } + return FALSE; } @@ -529,10 +558,70 @@ DevStatusPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) return FALSE; } +static INT_PTR CALLBACK +HdTypesPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch (uMsg) + { + case WM_NOTIFY: + { + LPNMHDR lpnm = (LPNMHDR)lParam; + + switch (lpnm->code) + { + case PSN_SETACTIVE: + { + PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK); + } + break; + + case PSN_WIZBACK: + { + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_SELECTWAYPAGE); + return TRUE; + } + } + } + break; + } + + return FALSE; +} + +static INT_PTR CALLBACK +ProgressPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch (uMsg) + { + case WM_NOTIFY: + { + LPNMHDR lpnm = (LPNMHDR)lParam; + + switch (lpnm->code) + { + case PSN_SETACTIVE: + { + PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK); + } + break; + + case PSN_WIZBACK: + { + SetWindowLong(hwndDlg, DWL_MSGRESULT, IDD_SELECTWAYPAGE); + return TRUE; + } + } + } + break; + } + + return FALSE; +} + static VOID HardwareWizardInit(HWND hwnd) { - HPROPSHEETPAGE ahpsp[8]; + HPROPSHEETPAGE ahpsp[10]; PROPSHEETPAGE psp = {0}; PROPSHEETHEADER psh; UINT nPages = 0; @@ -599,6 +688,28 @@ HardwareWizardInit(HWND hwnd) psp.pszTemplate = MAKEINTRESOURCE(IDD_HWSTATUSPAGE); ahpsp[nPages++] = CreatePropertySheetPage(&psp); + /* Create hardware types page */ + psp.dwSize = sizeof(PROPSHEETPAGE); + psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE; + psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_HDTYPESTITLE); + psp.pszHeaderSubTitle = NULL; + psp.hInstance = hApplet; + psp.lParam = 0; + psp.pfnDlgProc = HdTypesPageDlgProc; + psp.pszTemplate = MAKEINTRESOURCE(IDD_HWTYPESPAGE); + ahpsp[nPages++] = CreatePropertySheetPage(&psp); + + /* Create progress page */ + psp.dwSize = sizeof(PROPSHEETPAGE); + psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE; + psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_SEARCHTITLE); + psp.pszHeaderSubTitle = NULL; + psp.hInstance = hApplet; + psp.lParam = 0; + psp.pfnDlgProc = ProgressPageDlgProc; + psp.pszTemplate = MAKEINTRESOURCE(IDD_PROGRESSPAGE); + ahpsp[nPages++] = CreatePropertySheetPage(&psp); + /* Create finish page */ psp.dwSize = sizeof(PROPSHEETPAGE); psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER; diff --git a/reactos/dll/cpl/hdwwiz/lang/bg-BG.rc b/reactos/dll/cpl/hdwwiz/lang/bg-BG.rc index 5d90b2c90c5..b35770ae73a 100644 --- a/reactos/dll/cpl/hdwwiz/lang/bg-BG.rc +++ b/reactos/dll/cpl/hdwwiz/lang/bg-BG.rc @@ -143,4 +143,5 @@ BEGIN IDS_PROBELISTTITLE "The following hardware is already installed on your computer" IDS_ADDNEWDEVICE "Add a new hardware device" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/cs-CZ.rc b/reactos/dll/cpl/hdwwiz/lang/cs-CZ.rc index e38b492f505..e723aa75ed9 100644 --- a/reactos/dll/cpl/hdwwiz/lang/cs-CZ.rc +++ b/reactos/dll/cpl/hdwwiz/lang/cs-CZ.rc @@ -148,4 +148,5 @@ BEGIN IDS_PROBELISTTITLE "Následující hardware již je nainstalován na tomto poèítaèi" IDS_ADDNEWDEVICE "Pøidat nové hardwarové zaøízení" IDS_SELECTWAYTITLE "Prùvodce vám mùže pomoci nainstalovat jiný hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/de-DE.rc b/reactos/dll/cpl/hdwwiz/lang/de-DE.rc index debb120c954..7f2538851d7 100644 --- a/reactos/dll/cpl/hdwwiz/lang/de-DE.rc +++ b/reactos/dll/cpl/hdwwiz/lang/de-DE.rc @@ -143,4 +143,5 @@ BEGIN IDS_PROBELISTTITLE "Folgende Hardware ist bereits auf Ihrem Computer installiert" IDS_ADDNEWDEVICE "Ein neues Gerät hinzufügen" IDS_SELECTWAYTITLE "Der Assistent kann Sie bei der Installation anderer Hardware unterstützen" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/el-GR.rc b/reactos/dll/cpl/hdwwiz/lang/el-GR.rc index 041f0803b63..c31ef51f4f5 100644 --- a/reactos/dll/cpl/hdwwiz/lang/el-GR.rc +++ b/reactos/dll/cpl/hdwwiz/lang/el-GR.rc @@ -143,4 +143,5 @@ BEGIN IDS_PROBELISTTITLE "The following hardware is already installed on your computer" IDS_ADDNEWDEVICE "Add a new hardware device" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/en-US.rc b/reactos/dll/cpl/hdwwiz/lang/en-US.rc index d332cc6e7b8..bfbae2d4d48 100644 --- a/reactos/dll/cpl/hdwwiz/lang/en-US.rc +++ b/reactos/dll/cpl/hdwwiz/lang/en-US.rc @@ -143,4 +143,5 @@ BEGIN IDS_PROBELISTTITLE "The following hardware is already installed on your computer" IDS_ADDNEWDEVICE "Add a new hardware device" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/es-ES.rc b/reactos/dll/cpl/hdwwiz/lang/es-ES.rc index 5633d6b9976..9e299d84c74 100644 --- a/reactos/dll/cpl/hdwwiz/lang/es-ES.rc +++ b/reactos/dll/cpl/hdwwiz/lang/es-ES.rc @@ -143,4 +143,5 @@ BEGIN IDS_PROBELISTTITLE "El siguiente hardware ya está instalado en su equipo" IDS_ADDNEWDEVICE "Añadir un nuevo dispositivo hardware" IDS_SELECTWAYTITLE "El asistente puede ayudarle a instalar otro hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/fr-FR.rc b/reactos/dll/cpl/hdwwiz/lang/fr-FR.rc index fa37437d05f..3c250ccd89d 100644 --- a/reactos/dll/cpl/hdwwiz/lang/fr-FR.rc +++ b/reactos/dll/cpl/hdwwiz/lang/fr-FR.rc @@ -143,4 +143,5 @@ BEGIN IDS_PROBELISTTITLE "The following hardware is already installed on your computer" IDS_ADDNEWDEVICE "Add a new hardware device" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/hu-HU.rc b/reactos/dll/cpl/hdwwiz/lang/hu-HU.rc index b31602793ae..88ba40f36c3 100644 --- a/reactos/dll/cpl/hdwwiz/lang/hu-HU.rc +++ b/reactos/dll/cpl/hdwwiz/lang/hu-HU.rc @@ -144,4 +144,5 @@ BEGIN IDS_PROBELISTTITLE "The following hardware is already installed on your computer" IDS_ADDNEWDEVICE "Add a new hardware device" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/id-ID.rc b/reactos/dll/cpl/hdwwiz/lang/id-ID.rc index 66ddb070aa7..0203a0bd951 100644 --- a/reactos/dll/cpl/hdwwiz/lang/id-ID.rc +++ b/reactos/dll/cpl/hdwwiz/lang/id-ID.rc @@ -143,4 +143,5 @@ BEGIN IDS_PROBELISTTITLE "The following hardware is already installed on your computer" IDS_ADDNEWDEVICE "Add a new hardware device" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/it-IT.rc b/reactos/dll/cpl/hdwwiz/lang/it-IT.rc index b7e598578e8..9754755fd9e 100644 --- a/reactos/dll/cpl/hdwwiz/lang/it-IT.rc +++ b/reactos/dll/cpl/hdwwiz/lang/it-IT.rc @@ -143,4 +143,5 @@ BEGIN IDS_PROBELISTTITLE "The following hardware is already installed on your computer" IDS_ADDNEWDEVICE "Add a new hardware device" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/ja-JP.rc b/reactos/dll/cpl/hdwwiz/lang/ja-JP.rc index b939109664a..cc120321341 100644 --- a/reactos/dll/cpl/hdwwiz/lang/ja-JP.rc +++ b/reactos/dll/cpl/hdwwiz/lang/ja-JP.rc @@ -143,4 +143,5 @@ BEGIN IDS_PROBELISTTITLE "The following hardware is already installed on your computer" IDS_ADDNEWDEVICE "Add a new hardware device" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/nl-NL.rc b/reactos/dll/cpl/hdwwiz/lang/nl-NL.rc index 214bc7d5c9a..00c24de98df 100644 --- a/reactos/dll/cpl/hdwwiz/lang/nl-NL.rc +++ b/reactos/dll/cpl/hdwwiz/lang/nl-NL.rc @@ -143,4 +143,5 @@ BEGIN IDS_PROBELISTTITLE "The following hardware is already installed on your computer" IDS_ADDNEWDEVICE "Add a new hardware device" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/no-NO.rc b/reactos/dll/cpl/hdwwiz/lang/no-NO.rc index cd27d144d9b..b94d6635916 100644 --- a/reactos/dll/cpl/hdwwiz/lang/no-NO.rc +++ b/reactos/dll/cpl/hdwwiz/lang/no-NO.rc @@ -143,4 +143,5 @@ BEGIN IDS_PROBELISTTITLE "Følgende maskinvare har blitt installert på din datamaskin" IDS_ADDNEWDEVICE "Legg til en ny maskinvare enhet" IDS_SELECTWAYTITLE "Veiviseren kan hjelpe deg å installere andre maskinvare" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/pl-PL.rc b/reactos/dll/cpl/hdwwiz/lang/pl-PL.rc index 5039f03e2c3..00e1ef8fa7e 100644 --- a/reactos/dll/cpl/hdwwiz/lang/pl-PL.rc +++ b/reactos/dll/cpl/hdwwiz/lang/pl-PL.rc @@ -148,4 +148,5 @@ BEGIN IDS_PROBELISTTITLE "Poni¿sze urz¹dzenia s¹ ju¿ zainstalowane na tym komputerze" IDS_ADDNEWDEVICE "Dodaj nowe urz¹dzenie sprzêtowe" IDS_SELECTWAYTITLE "Kreator mo¿e pomóc Tobie zainstalowaæ inne urz¹dzenie" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/pt-BR.rc b/reactos/dll/cpl/hdwwiz/lang/pt-BR.rc index 7015e451b91..6b1cfde0d21 100644 --- a/reactos/dll/cpl/hdwwiz/lang/pt-BR.rc +++ b/reactos/dll/cpl/hdwwiz/lang/pt-BR.rc @@ -143,4 +143,5 @@ BEGIN IDS_PROBELISTTITLE "The following hardware is already installed on your computer" IDS_ADDNEWDEVICE "Add a new hardware device" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/ru-RU.rc b/reactos/dll/cpl/hdwwiz/lang/ru-RU.rc index a1e4838894f..32d37049c71 100644 --- a/reactos/dll/cpl/hdwwiz/lang/ru-RU.rc +++ b/reactos/dll/cpl/hdwwiz/lang/ru-RU.rc @@ -143,4 +143,5 @@ BEGIN IDS_PROBELISTTITLE "Íà ýòîì êîìïüþòåðå óæå óñòàíîâëåíî ñëåäóþùåå îáîðóäîâàíèå" IDS_ADDNEWDEVICE "Äîáàâëåíèå íîâîãî óñòðîéñòâà" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/sk-SK.rc b/reactos/dll/cpl/hdwwiz/lang/sk-SK.rc index 73c43906ba0..e1b47bd35a6 100644 --- a/reactos/dll/cpl/hdwwiz/lang/sk-SK.rc +++ b/reactos/dll/cpl/hdwwiz/lang/sk-SK.rc @@ -148,4 +148,5 @@ BEGIN IDS_PROBELISTTITLE "The following hardware is already installed on your computer" IDS_ADDNEWDEVICE "Add a new hardware device" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/th-TH.rc b/reactos/dll/cpl/hdwwiz/lang/th-TH.rc index df44207fa32..a4499dc3434 100644 --- a/reactos/dll/cpl/hdwwiz/lang/th-TH.rc +++ b/reactos/dll/cpl/hdwwiz/lang/th-TH.rc @@ -143,4 +143,5 @@ BEGIN IDS_PROBELISTTITLE "The following hardware is already installed on your computer" IDS_ADDNEWDEVICE "Add a new hardware device" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/uk-UA.rc b/reactos/dll/cpl/hdwwiz/lang/uk-UA.rc index 0a03e6063c3..3f6bf2c41c7 100644 --- a/reactos/dll/cpl/hdwwiz/lang/uk-UA.rc +++ b/reactos/dll/cpl/hdwwiz/lang/uk-UA.rc @@ -151,4 +151,5 @@ BEGIN IDS_PROBELISTTITLE "The following hardware is already installed on your computer" IDS_ADDNEWDEVICE "Add a new hardware device" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/lang/zh-CN.rc b/reactos/dll/cpl/hdwwiz/lang/zh-CN.rc index afdf83d84b2..493a4ac7a56 100644 --- a/reactos/dll/cpl/hdwwiz/lang/zh-CN.rc +++ b/reactos/dll/cpl/hdwwiz/lang/zh-CN.rc @@ -149,4 +149,5 @@ BEGIN IDS_PROBELISTTITLE "The following hardware is already installed on your computer" IDS_ADDNEWDEVICE "Add a new hardware device" IDS_SELECTWAYTITLE "The wizard can help you install other hardware" + IDS_HDTYPESTITLE "From the list below, select the type of hardware you are installing" END diff --git a/reactos/dll/cpl/hdwwiz/resource.h b/reactos/dll/cpl/hdwwiz/resource.h index 9401571c450..98f8a9c6c75 100644 --- a/reactos/dll/cpl/hdwwiz/resource.h +++ b/reactos/dll/cpl/hdwwiz/resource.h @@ -17,6 +17,7 @@ #define IDS_SEARCHTEXT 1020 #define IDS_SEARCHTITLE 1025 #define IDS_SELECTWAYTITLE 1027 +#define IDS_HDTYPESTITLE 1061 #define IDS_ADDNEWDEVICE 1081 #define IDS_ISCONNECTED 1113