Author: mkupfer
Date: Mon Jan 11 00:22:01 2010
New Revision: 45036
URL:
http://svn.reactos.org/svn/reactos?rev=45036&view=rev
Log:
- fixes issue with cancel button
- fixes problems with unattended mode
- temporarily enable device listing (setupapi)
Modified:
trunk/reactos/base/setup/reactos/reactos.c
Modified: trunk/reactos/base/setup/reactos/reactos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/reactos…
==============================================================================
--- trunk/reactos/base/setup/reactos/reactos.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/reactos/reactos.c [iso-8859-1] Mon Jan 11 00:22:01 2010
@@ -668,7 +668,7 @@
WPARAM wParam,
LPARAM lParam)
{
-#if 0
+#if 1
HDEVINFO h;
HWND hList;
SP_DEVINFO_DATA DevInfoData;
@@ -692,7 +692,7 @@
WM_SETFONT,
(WPARAM)hTitleFont,
(LPARAM)TRUE);*/
-#if 0
+#if 1
h = SetupDiGetClassDevs(&GUID_DEVCLASS_DISKDRIVE, NULL, NULL,
DIGCF_PRESENT);
if (h != INVALID_HANDLE_VALUE)
{
@@ -805,10 +805,6 @@
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
- hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
- ShowWindow(hwndControl, SW_HIDE);
- EnableWindow(hwndControl, FALSE);
-
/* Set title font */
/*SendDlgItemMessage(hwndDlg,
IDC_STARTTITLE,
@@ -828,6 +824,14 @@
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT |
PSWIZB_BACK);
break;
+ case PSN_QUERYCANCEL:
+ SetWindowLongPtr(hwndDlg,
+ DWL_MSGRESULT,
+ MessageBox(GetParent(hwndDlg),
+ abort_msg,
+ abort_title,
+ MB_YESNO | MB_ICONQUESTION) != IDYES);
+ return TRUE;
default:
break;
}
@@ -859,10 +863,6 @@
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
- hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
- ShowWindow(hwndControl, SW_HIDE);
- EnableWindow(hwndControl, FALSE);
-
/* Set title font */
/*SendDlgItemMessage(hwndDlg,
IDC_STARTTITLE,
@@ -883,7 +883,14 @@
// disable all buttons during installation process
// PropSheet_SetWizButtons(GetParent(hwndDlg), 0 );
break;
-
+ case PSN_QUERYCANCEL:
+ SetWindowLongPtr(hwndDlg,
+ DWL_MSGRESULT,
+ MessageBox(GetParent(hwndDlg),
+ abort_msg,
+ abort_title,
+ MB_YESNO | MB_ICONQUESTION) != IDYES);
+ return TRUE;
default:
break;
}
@@ -916,6 +923,10 @@
dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
+ hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
+ ShowWindow(hwndControl, SW_HIDE);
+ EnableWindow(hwndControl, FALSE);
+
/* Set title font */
/*SendDlgItemMessage(hwndDlg,
IDC_STARTTITLE,
@@ -1194,10 +1205,10 @@
hInstance = hInst;
isUnattend = isUnattendSetup();
+ LoadString(hInst,IDS_ABORTSETUP, abort_msg, sizeof(abort_msg)/sizeof(TCHAR));
+ LoadString(hInst,IDS_ABORTSETUP2, abort_title,sizeof(abort_title)/sizeof(TCHAR));
if (!isUnattend)
{
- LoadString(hInst,IDS_ABORTSETUP, abort_msg, sizeof(abort_msg)/sizeof(TCHAR));
- LoadString(hInst,IDS_ABORTSETUP2,
abort_title,sizeof(abort_title)/sizeof(TCHAR));
LoadSetupData();
@@ -1277,19 +1288,16 @@
psp.pszTemplate = MAKEINTRESOURCE(IDD_PROCESSPAGE);
ahpsp[nPages++] = CreatePropertySheetPage(&psp);
- if (!isUnattend)
- {
- /* Create finish to reboot page */
- psp.dwSize = sizeof(PROPSHEETPAGE);
- psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
- psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_RESTARTTITLE);
- psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_RESTARTSUBTITLE);
- psp.hInstance = hInst;
- psp.lParam = 0;
- psp.pfnDlgProc = RestartDlgProc;
- psp.pszTemplate = MAKEINTRESOURCE(IDD_RESTARTPAGE);
- ahpsp[nPages++] = CreatePropertySheetPage(&psp);
- }
+ /* Create finish to reboot page */
+ psp.dwSize = sizeof(PROPSHEETPAGE);
+ psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+ psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_RESTARTTITLE);
+ psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_RESTARTSUBTITLE);
+ psp.hInstance = hInst;
+ psp.lParam = 0;
+ psp.pfnDlgProc = RestartDlgProc;
+ psp.pszTemplate = MAKEINTRESOURCE(IDD_RESTARTPAGE);
+ ahpsp[nPages++] = CreatePropertySheetPage(&psp);
/* Create the property sheet */
psh.dwSize = sizeof(PROPSHEETHEADER);