mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
integrate the reboot dialog into the wizard
svn path=/trunk/; revision=18813
This commit is contained in:
parent
7b494e5fe8
commit
5f0cd0e893
9 changed files with 115 additions and 159 deletions
|
@ -50,8 +50,6 @@
|
|||
#include "globals.h"
|
||||
#include "resource.h"
|
||||
|
||||
#define VMWINST
|
||||
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
||||
|
@ -80,30 +78,6 @@ DebugPrint(char* fmt,...)
|
|||
}
|
||||
|
||||
|
||||
#ifdef VMWINST
|
||||
static BOOL
|
||||
RunVMWInstall(VOID)
|
||||
{
|
||||
PROCESS_INFORMATION ProcInfo;
|
||||
STARTUPINFO si;
|
||||
WCHAR InstallName[] = L"vmwinst.exe";
|
||||
|
||||
ZeroMemory(&si, sizeof(STARTUPINFO));
|
||||
si.cb = sizeof(STARTUPINFO);
|
||||
|
||||
if(CreateProcess(NULL, InstallName, NULL, NULL, TRUE, NORMAL_PRIORITY_CLASS,
|
||||
NULL, NULL, &si, &ProcInfo))
|
||||
{
|
||||
WaitForSingleObject(ProcInfo.hProcess, INFINITE);
|
||||
CloseHandle(ProcInfo.hThread);
|
||||
CloseHandle(ProcInfo.hProcess);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT CreateShellLink(LPCTSTR linkPath, LPCTSTR cmd, LPCTSTR arg, LPCTSTR dir, LPCTSTR iconPath, int icon_nr, LPCTSTR comment)
|
||||
{
|
||||
IShellLink* psl;
|
||||
|
@ -561,15 +535,6 @@ InstallReactOS (HINSTANCE hInstance)
|
|||
|
||||
SetupCloseInfFile(hSysSetupInf);
|
||||
|
||||
#ifdef VMWINST
|
||||
RunVMWInstall();
|
||||
#endif
|
||||
|
||||
DialogBox(hDllInstance,
|
||||
MAKEINTRESOURCE(IDD_RESTART),
|
||||
NULL,
|
||||
RestartDlgProc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,10 +57,7 @@
|
|||
|
||||
#define IDD_FINISHPAGE 1070
|
||||
#define IDC_FINISHTITLE 1071
|
||||
|
||||
|
||||
#define IDD_RESTART 2000
|
||||
#define IDC_RESTART_PROGRESS 2001
|
||||
#define IDC_RESTART_PROGRESS 1072
|
||||
|
||||
#define IDD_GPL 2100
|
||||
#define IDC_GPL_TEXT 2101
|
||||
|
|
|
@ -144,24 +144,12 @@ BEGIN
|
|||
LTEXT "Completing the ReactOS Setup Wizard",IDC_FINISHTITLE,115,9,195,37
|
||||
LTEXT "You have successfully completed ReactOS Setup.\n\n" \
|
||||
"When you click Finish, your computer will restart.", IDC_STATIC, 115, 58, 195, 100
|
||||
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12
|
||||
LTEXT "If there is a CD in a drive, remove it. Then, to restart "\
|
||||
"your computer, click Finish.", IDC_STATIC, 115, 160, 195, 31
|
||||
END
|
||||
|
||||
|
||||
IDD_RESTART DIALOG 6, 18, 245, 116
|
||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION
|
||||
CAPTION "Instatalace ReactOSu"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Instalace ReactOSu byla úspìšnì dokonèena.", -1, 13, 12, 212, 16
|
||||
LTEXT "Pro pokraèování potøebuje instalaèní program restartovat Váš poèítaè. Poèítaè bude automaticky restartován za 15 sekund nebo zmáèknete-li tlaèítko Restartovat.", -1, 13, 33, 212, 32
|
||||
/* GROUPBOX "", -1, 7, 3, 231, 106 */
|
||||
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 13, 70, 212, 8
|
||||
PUSHBUTTON "&Restartovat", IDOK, 98, 87, 50, 14
|
||||
END
|
||||
|
||||
|
||||
IDD_GPL DIALOG 0, 0, 333, 230
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "GNU General Public License"
|
||||
|
|
|
@ -146,26 +146,12 @@ BEGIN
|
|||
LTEXT "Fertigstellung des ReactOS Setup Assistenten",IDC_FINISHTITLE,115,9,195,37
|
||||
LTEXT "Das ReactOS Setup wurde erfolgreich fertiggestellt.\n\n" \
|
||||
"Wenn Sie auf Fertig klicken, wird der Computer neu gestartet.", IDC_STATIC, 115, 58, 195, 100
|
||||
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12
|
||||
LTEXT "Entfernen Sie die CD, wenn vorhanden. Danach klicken Sie "\
|
||||
"auf Fertig, um den Computer neu zu starten.", IDC_STATIC, 115, 160, 195, 31
|
||||
END
|
||||
|
||||
|
||||
IDD_RESTART DIALOG 6, 18, 245, 116
|
||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION
|
||||
CAPTION "ReactOS Installation"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Die Installation von ReactOS wurde erfolgreich fertiggestellt.", IDC_STATIC, 13, 12, 212, 16
|
||||
LTEXT "Um fortzufahren muss Ihr Computer neu gestartet werden. "\
|
||||
"Der Computer wird in 15 Minuten automatisch neu gestartet oder wenn Sie auf "\
|
||||
"Neustart klicken.", IDC_STATIC, 13, 33, 212, 32
|
||||
/* GROUPBOX "", -1, 7, 3, 231, 106 */
|
||||
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 13, 70, 212, 8
|
||||
PUSHBUTTON "&Neustart", IDOK, 98, 87, 50, 14
|
||||
END
|
||||
|
||||
|
||||
IDD_GPL DIALOG 0, 0, 333, 230
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "GNU General Public License"
|
||||
|
|
|
@ -147,26 +147,12 @@ BEGIN
|
|||
LTEXT "Completing the ReactOS Setup Wizard", IDC_FINISHTITLE, 115, 8, 195, 24
|
||||
LTEXT "You have successfully completed ReactOS Setup.\n\n" \
|
||||
"When you click Finish, your computer will restart.", IDC_STATIC, 115, 40, 195, 100
|
||||
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12
|
||||
LTEXT "If there is a CD in a drive, remove it. Then, to restart "\
|
||||
"your computer, click Finish.", IDC_STATIC, 115, 169, 195, 17
|
||||
END
|
||||
|
||||
|
||||
IDD_RESTART DIALOG 6, 18, 245, 116
|
||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION
|
||||
CAPTION "ReactOS Installation"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Installation of ReactOS was successfully completed.", IDC_STATIC, 13, 12, 212, 16
|
||||
LTEXT "In order to continue, the installation program needs to restart your computer. "\
|
||||
"The computer will be automatically restarted in 15 seconds or if you press the "\
|
||||
"Restart button.", IDC_STATIC, 13, 33, 212, 32
|
||||
/* GROUPBOX "", -1, 7, 3, 231, 106 */
|
||||
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 13, 70, 212, 8
|
||||
PUSHBUTTON "&Restart", IDOK, 98, 87, 50, 14
|
||||
END
|
||||
|
||||
|
||||
IDD_GPL DIALOG 0, 0, 333, 230
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "GNU General Public License"
|
||||
|
|
|
@ -147,26 +147,12 @@ BEGIN
|
|||
LTEXT "L'assistant d'installation de ReactOS est terminé.",IDC_FINISHTITLE,115,9,195,37
|
||||
LTEXT "Vous avez installé avec succès ReactOS.\n\n" \
|
||||
"En cliquant sur Terminer, votre ordinateur va redémarrer.", IDC_STATIC, 115, 58, 195, 100
|
||||
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12
|
||||
LTEXT "S'il y a un CD dans un lecteur, enlevez-le. Puis, pour redémarrer "\
|
||||
"votre ordinateur, cliquez sur Terminer.", IDC_STATIC, 115, 160, 195, 31
|
||||
END
|
||||
|
||||
|
||||
IDD_RESTART DIALOG 6, 18, 245, 116
|
||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION
|
||||
CAPTION "Installation de ReactOS"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "L'assistant d'installation de ReactOS est terminé.", IDC_STATIC, 13, 12, 212, 16
|
||||
LTEXT "Pour continuer, l'assistant a besoin de redémarrer votre ordinateur. "\
|
||||
"L'ordinateur redémarrera automatiquement dans 15 secondes, ou quand vous appuyerez "\
|
||||
"sur le bouton Redémarrer.", IDC_STATIC, 13, 33, 212, 32
|
||||
/* GROUPBOX "", -1, 7, 3, 231, 106 */
|
||||
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 13, 70, 212, 8
|
||||
PUSHBUTTON "&Redémarrer", IDOK, 98, 87, 50, 14
|
||||
END
|
||||
|
||||
|
||||
IDD_GPL DIALOG 0, 0, 333, 230
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "GNU General Public License"
|
||||
|
|
|
@ -147,26 +147,12 @@ BEGIN
|
|||
LTEXT "ReactOS セットアップ ウィザードが完了しました", IDC_FINISHTITLE, 115, 8, 195, 24
|
||||
LTEXT "ReactOS セットアップが正常に完了しました。\n\n" \
|
||||
"[完了] をクリックすると、コンピュータを再起動します。", IDC_STATIC, 115, 40, 195, 100
|
||||
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12
|
||||
LTEXT "ドライブに CD が入っている場合は、CD を取り出してください。CD を取り出し"\
|
||||
"たら、[完了] をクリックしてコンピュータを再起動してください。", IDC_STATIC, 115, 169, 195, 17
|
||||
END
|
||||
|
||||
|
||||
IDD_RESTART DIALOG 6, 18, 245, 116
|
||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION
|
||||
CAPTION "ReactOS のインストール"
|
||||
FONT 9, "MS UI Gothic"
|
||||
BEGIN
|
||||
LTEXT "ReactOS は正常にインストールされました。", IDC_STATIC, 13, 12, 212, 16
|
||||
LTEXT "インストール プログラムを続けるには、コンピュータを再起動する必要があります。"\
|
||||
"コンピュータは 15 秒後に自動的に再起動します。今すぐ再起動するには"\
|
||||
"[再起動] ボタンをクリックしてください。", IDC_STATIC, 13, 33, 212, 32
|
||||
/* GROUPBOX "", -1, 7, 3, 231, 106 */
|
||||
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 13, 70, 212, 8
|
||||
PUSHBUTTON "再起動(&R)", IDOK, 98, 87, 50, 14
|
||||
END
|
||||
|
||||
|
||||
IDD_GPL DIALOG 0, 0, 333, 230
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "GNU General Public License"
|
||||
|
|
|
@ -147,26 +147,12 @@ BEGIN
|
|||
LTEXT "Completing the ReactOS Setup Wizard", IDC_FINISHTITLE, 115, 8, 195, 24
|
||||
LTEXT "You have successfully completed ReactOS Setup.\n\n" \
|
||||
"When you click Finish, your computer will restart.", IDC_STATIC, 115, 40, 195, 100
|
||||
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 115, 138, 188, 12
|
||||
LTEXT "If there is a CD in a drive, remove it. Then, to restart "\
|
||||
"your computer, click Finish.", IDC_STATIC, 115, 169, 195, 17
|
||||
END
|
||||
|
||||
|
||||
IDD_RESTART DIALOG 6, 18, 245, 116
|
||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION
|
||||
CAPTION "ReactOS Installation"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "Installation of ReactOS was successfully completed.", IDC_STATIC, 13, 12, 212, 16
|
||||
LTEXT "In order to continue, the installation program needs to restart your computer. "\
|
||||
"The computer will be automatically restarted in 15 seconds or if you press the "\
|
||||
"Restart button.", IDC_STATIC, 13, 33, 212, 32
|
||||
/* GROUPBOX "", -1, 7, 3, 231, 106 */
|
||||
CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 13, 70, 212, 8
|
||||
PUSHBUTTON "&Restart", IDOK, 98, 87, 50, 14
|
||||
END
|
||||
|
||||
|
||||
IDD_GPL DIALOG 0, 0, 333, 230
|
||||
STYLE DS_CENTER | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "GNU General Public License"
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "globals.h"
|
||||
#include "resource.h"
|
||||
|
||||
#define VMWINST
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
||||
|
@ -46,6 +47,47 @@ static SETUPDATA SetupData;
|
|||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
#ifdef VMWINST
|
||||
static BOOL
|
||||
RunVMWInstall(HWND hWnd)
|
||||
{
|
||||
PROCESS_INFORMATION ProcInfo;
|
||||
MSG msg;
|
||||
DWORD ret;
|
||||
STARTUPINFO si = {0};
|
||||
WCHAR InstallName[] = L"vmwinst.exe";
|
||||
|
||||
si.cb = sizeof(STARTUPINFO);
|
||||
|
||||
if(CreateProcess(NULL, InstallName, NULL, NULL, TRUE, NORMAL_PRIORITY_CLASS,
|
||||
NULL, NULL, &si, &ProcInfo))
|
||||
{
|
||||
EnableWindow(hWnd, FALSE);
|
||||
for (;;)
|
||||
{
|
||||
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
|
||||
{
|
||||
if (msg.message == WM_QUIT)
|
||||
goto done;
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
ret = MsgWaitForMultipleObjects(1, &ProcInfo.hProcess, FALSE, INFINITE, QS_ALLEVENTS | QS_ALLINPUT);
|
||||
if (ret == WAIT_OBJECT_0)
|
||||
break;
|
||||
}
|
||||
done:
|
||||
EnableWindow(hWnd, TRUE);
|
||||
|
||||
CloseHandle(ProcInfo.hThread);
|
||||
CloseHandle(ProcInfo.hProcess);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static VOID
|
||||
CenterWindow(HWND hWnd)
|
||||
{
|
||||
|
@ -96,7 +138,7 @@ CreateTitleFont(VOID)
|
|||
}
|
||||
|
||||
|
||||
INT_PTR CALLBACK
|
||||
static INT_PTR CALLBACK
|
||||
GplDlgProc(HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
|
@ -165,7 +207,7 @@ GplDlgProc(HWND hwndDlg,
|
|||
}
|
||||
|
||||
|
||||
INT_PTR CALLBACK
|
||||
static INT_PTR CALLBACK
|
||||
WelcomeDlgProc(HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
|
@ -231,7 +273,7 @@ WelcomeDlgProc(HWND hwndDlg,
|
|||
}
|
||||
|
||||
|
||||
INT_PTR CALLBACK
|
||||
static INT_PTR CALLBACK
|
||||
AckPageDlgProc(HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
|
@ -323,7 +365,7 @@ AckPageDlgProc(HWND hwndDlg,
|
|||
}
|
||||
|
||||
|
||||
INT_PTR CALLBACK
|
||||
static INT_PTR CALLBACK
|
||||
OwnerPageDlgProc(HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
|
@ -413,7 +455,7 @@ OwnerPageDlgProc(HWND hwndDlg,
|
|||
}
|
||||
|
||||
|
||||
INT_PTR CALLBACK
|
||||
static INT_PTR CALLBACK
|
||||
ComputerPageDlgProc(HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
|
@ -576,8 +618,8 @@ SetKeyboardLayoutName(HWND hwnd)
|
|||
static VOID
|
||||
RunInputLocalePage(HWND hwnd)
|
||||
{
|
||||
PROPSHEETPAGE psp;
|
||||
PROPSHEETHEADER psh;
|
||||
PROPSHEETPAGE psp = {0};
|
||||
PROPSHEETHEADER psh = {0};
|
||||
HMODULE hDll;
|
||||
// TCHAR Caption[256];
|
||||
|
||||
|
@ -585,7 +627,6 @@ RunInputLocalePage(HWND hwnd)
|
|||
if (hDll == NULL)
|
||||
return;
|
||||
|
||||
ZeroMemory(&psp, sizeof(PROPSHEETPAGE));
|
||||
psp.dwSize = sizeof(PROPSHEETPAGE);
|
||||
psp.dwFlags = PSP_DEFAULT;
|
||||
psp.hInstance = hDll;
|
||||
|
@ -594,7 +635,6 @@ RunInputLocalePage(HWND hwnd)
|
|||
|
||||
// LoadString(hDll, IDS_CPLNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
|
||||
|
||||
ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
|
||||
psh.dwSize = sizeof(PROPSHEETHEADER);
|
||||
psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE;
|
||||
// psh.hwndParent = hwnd;
|
||||
|
@ -611,7 +651,7 @@ RunInputLocalePage(HWND hwnd)
|
|||
}
|
||||
|
||||
|
||||
INT_PTR CALLBACK
|
||||
static INT_PTR CALLBACK
|
||||
LocalePageDlgProc(HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
|
@ -1178,7 +1218,7 @@ SetSystemLocalTime(HWND hwnd, PSETUPDATA SetupData)
|
|||
}
|
||||
|
||||
|
||||
INT_PTR CALLBACK
|
||||
static INT_PTR CALLBACK
|
||||
DateTimePageDlgProc(HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
|
@ -1252,7 +1292,7 @@ DateTimePageDlgProc(HWND hwndDlg,
|
|||
}
|
||||
|
||||
|
||||
INT_PTR CALLBACK
|
||||
static INT_PTR CALLBACK
|
||||
ProcessPageDlgProc(HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
|
@ -1280,12 +1320,24 @@ ProcessPageDlgProc(HWND hwndDlg,
|
|||
|
||||
hWndProgress = GetDlgItem(hwndDlg, IDC_PROCESSPROGRESS);
|
||||
Position = SendMessage(hWndProgress, PBM_GETPOS, 0, 0);
|
||||
if (Position == 300)
|
||||
if (Position == 2)
|
||||
{
|
||||
KillTimer(hwndDlg, 1);
|
||||
|
||||
/* Enable the Back and Next buttons */
|
||||
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT);
|
||||
PropSheet_PressButton(GetParent(hwndDlg), PSBTN_NEXT);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef VMWINST
|
||||
if (Position == 1)
|
||||
{
|
||||
KillTimer(hwndDlg, 1);
|
||||
RunVMWInstall(GetParent(hwndDlg));
|
||||
SetTimer(hwndDlg, 1, 50, NULL);
|
||||
}
|
||||
#endif
|
||||
SendMessage(hWndProgress, PBM_SETPOS, Position + 1, 0);
|
||||
}
|
||||
}
|
||||
|
@ -1302,14 +1354,11 @@ ProcessPageDlgProc(HWND hwndDlg,
|
|||
PropSheet_SetWizButtons(GetParent(hwndDlg), 0);
|
||||
|
||||
SendDlgItemMessage(hwndDlg, IDC_PROCESSPROGRESS, PBM_SETRANGE, 0,
|
||||
MAKELPARAM(0, 300));
|
||||
MAKELPARAM(0, 2));
|
||||
SetTimer(hwndDlg, 1, 50, NULL);
|
||||
break;
|
||||
|
||||
case PSN_WIZNEXT:
|
||||
|
||||
/* Enable the Back and Next buttons */
|
||||
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1327,7 +1376,7 @@ ProcessPageDlgProc(HWND hwndDlg,
|
|||
|
||||
|
||||
|
||||
INT_PTR CALLBACK
|
||||
static INT_PTR CALLBACK
|
||||
FinishDlgProc(HWND hwndDlg,
|
||||
UINT uMsg,
|
||||
WPARAM wParam,
|
||||
|
@ -1352,6 +1401,25 @@ FinishDlgProc(HWND hwndDlg,
|
|||
}
|
||||
break;
|
||||
|
||||
case WM_TIMER:
|
||||
{
|
||||
INT Position;
|
||||
HWND hWndProgress;
|
||||
|
||||
hWndProgress = GetDlgItem(hwndDlg, IDC_RESTART_PROGRESS);
|
||||
Position = SendMessage(hWndProgress, PBM_GETPOS, 0, 0);
|
||||
if (Position == 300)
|
||||
{
|
||||
KillTimer(hwndDlg, 1);
|
||||
PropSheet_PressButton(GetParent(hwndDlg), PSBTN_FINISH);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessage(hWndProgress, PBM_SETPOS, Position + 1, 0);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
case WM_NOTIFY:
|
||||
{
|
||||
LPNMHDR lpnm = (LPNMHDR)lParam;
|
||||
|
@ -1361,11 +1429,21 @@ FinishDlgProc(HWND hwndDlg,
|
|||
case PSN_SETACTIVE:
|
||||
/* Enable the correct buttons on for the active page */
|
||||
PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_FINISH);
|
||||
|
||||
SendDlgItemMessage(hwndDlg, IDC_RESTART_PROGRESS, PBM_SETRANGE, 0,
|
||||
MAKELPARAM(0, 300));
|
||||
SendDlgItemMessage(hwndDlg, IDC_RESTART_PROGRESS, PBM_SETPOS, 0, 0);
|
||||
SetTimer(hwndDlg, 1, 50, NULL);
|
||||
break;
|
||||
|
||||
case PSN_WIZBACK:
|
||||
/* Handle a Back button click, if necessary */
|
||||
break;
|
||||
KillTimer(hwndDlg, 1);
|
||||
|
||||
/* Skip the progress page */
|
||||
PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_DATETIMEPAGE);
|
||||
SetWindowLong(hwndDlg, DWL_MSGRESULT, -1);
|
||||
return TRUE;
|
||||
|
||||
case PSN_WIZFINISH:
|
||||
/* Handle a Finish button click, if necessary */
|
||||
|
@ -1390,20 +1468,20 @@ InstallWizard(VOID)
|
|||
{
|
||||
PROPSHEETHEADER psh;
|
||||
HPROPSHEETPAGE ahpsp[8];
|
||||
PROPSHEETPAGE psp;
|
||||
PROPSHEETPAGE psp = {0};
|
||||
UINT nPages = 0;
|
||||
|
||||
/* Clear setup data */
|
||||
ZeroMemory(&SetupData, sizeof(SETUPDATA));
|
||||
|
||||
/* Create the Welcome page */
|
||||
ZeroMemory (&psp, sizeof(PROPSHEETPAGE));
|
||||
psp.dwSize = sizeof(PROPSHEETPAGE);
|
||||
psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
|
||||
psp.hInstance = hDllInstance;
|
||||
psp.lParam = (LPARAM)&SetupData;
|
||||
psp.pfnDlgProc = WelcomeDlgProc;
|
||||
psp.pszTemplate = MAKEINTRESOURCE(IDD_WELCOMEPAGE);
|
||||
ahpsp[0] = CreatePropertySheetPage(&psp);
|
||||
ahpsp[nPages++] = CreatePropertySheetPage(&psp);
|
||||
|
||||
/* Create the Acknowledgements page */
|
||||
psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
|
||||
|
@ -1411,7 +1489,7 @@ InstallWizard(VOID)
|
|||
psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_ACKSUBTITLE);
|
||||
psp.pszTemplate = MAKEINTRESOURCE(IDD_ACKPAGE);
|
||||
psp.pfnDlgProc = AckPageDlgProc;
|
||||
ahpsp[1] = CreatePropertySheetPage(&psp);
|
||||
ahpsp[nPages++] = CreatePropertySheetPage(&psp);
|
||||
|
||||
/* Create the Owner page */
|
||||
psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
|
||||
|
@ -1419,7 +1497,7 @@ InstallWizard(VOID)
|
|||
psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_OWNERSUBTITLE);
|
||||
psp.pszTemplate = MAKEINTRESOURCE(IDD_OWNERPAGE);
|
||||
psp.pfnDlgProc = OwnerPageDlgProc;
|
||||
ahpsp[2] = CreatePropertySheetPage(&psp);
|
||||
ahpsp[nPages++] = CreatePropertySheetPage(&psp);
|
||||
|
||||
/* Create the Computer page */
|
||||
psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
|
||||
|
@ -1427,7 +1505,7 @@ InstallWizard(VOID)
|
|||
psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_COMPUTERSUBTITLE);
|
||||
psp.pfnDlgProc = ComputerPageDlgProc;
|
||||
psp.pszTemplate = MAKEINTRESOURCE(IDD_COMPUTERPAGE);
|
||||
ahpsp[3] = CreatePropertySheetPage(&psp);
|
||||
ahpsp[nPages++] = CreatePropertySheetPage(&psp);
|
||||
|
||||
|
||||
/* Create the Locale page */
|
||||
|
@ -1436,7 +1514,7 @@ InstallWizard(VOID)
|
|||
psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_LOCALESUBTITLE);
|
||||
psp.pfnDlgProc = LocalePageDlgProc;
|
||||
psp.pszTemplate = MAKEINTRESOURCE(IDD_LOCALEPAGE);
|
||||
ahpsp[4] = CreatePropertySheetPage(&psp);
|
||||
ahpsp[nPages++] = CreatePropertySheetPage(&psp);
|
||||
|
||||
|
||||
/* Create the DateTime page */
|
||||
|
@ -1445,32 +1523,30 @@ InstallWizard(VOID)
|
|||
psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_DATETIMESUBTITLE);
|
||||
psp.pfnDlgProc = DateTimePageDlgProc;
|
||||
psp.pszTemplate = MAKEINTRESOURCE(IDD_DATETIMEPAGE);
|
||||
ahpsp[5] = CreatePropertySheetPage(&psp);
|
||||
ahpsp[nPages++] = CreatePropertySheetPage(&psp);
|
||||
|
||||
|
||||
/* Create the Process page */
|
||||
#if 0
|
||||
psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
|
||||
psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_PROCESSTITLE);
|
||||
psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_PROCESSSUBTITLE);
|
||||
psp.pfnDlgProc = ProcessPageDlgProc;
|
||||
psp.pszTemplate = MAKEINTRESOURCE(IDD_PROCESSPAGE);
|
||||
ahpsp[6] = CreatePropertySheetPage(&psp);
|
||||
#endif
|
||||
ahpsp[nPages++] = CreatePropertySheetPage(&psp);
|
||||
|
||||
|
||||
/* Create the Finish page */
|
||||
psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
|
||||
psp.pfnDlgProc = FinishDlgProc;
|
||||
psp.pszTemplate = MAKEINTRESOURCE(IDD_FINISHPAGE);
|
||||
ahpsp[6] = CreatePropertySheetPage(&psp);
|
||||
ahpsp[nPages++] = CreatePropertySheetPage(&psp);
|
||||
|
||||
/* Create the property sheet */
|
||||
psh.dwSize = sizeof(PROPSHEETHEADER);
|
||||
psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER;
|
||||
psh.hInstance = hDllInstance;
|
||||
psh.hwndParent = NULL;
|
||||
psh.nPages = 7;
|
||||
psh.nPages = nPages;
|
||||
psh.nStartPage = 0;
|
||||
psh.phpage = ahpsp;
|
||||
psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK);
|
||||
|
|
Loading…
Reference in a new issue