Commit 6ea26b50 authored by Thomas Weidenmueller's avatar Thomas Weidenmueller Committed by Alexandre Julliard

- Support PSH_WIZARDHASFINISH in wizards.

- Correct tab order of the wizard buttons.
parent 06822b89
......@@ -37,9 +37,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Wizard"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "结束", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "下一步(&N) >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< 上一步(&B)", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "下一步(&N) >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "结束", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "取消", IDCANCEL,178,138,50,14
PUSHBUTTON "帮助", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -39,9 +39,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Prvodce"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Dokonit", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "&Dal >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< &Zpt", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "&Dal >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "Dokonit", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "Storno", IDCANCEL,178,138,50,14
PUSHBUTTON "Npovda", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -57,9 +57,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Wizard"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "&Beenden", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "&Weiter >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< &Zurck", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "&Weiter >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "&Beenden", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "Abbrechen", IDCANCEL,178,138,50,14
PUSHBUTTON "&Hilfe", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -36,9 +36,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Wizard"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Finish", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "&Next >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< &Back", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "&Next >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "Finish", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "Cancel", IDCANCEL,178,138,50,14
PUSHBUTTON "Help", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -36,9 +36,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Ayudante"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Terminar", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "&Siguiente >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< &Anterior", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "&Siguiente >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "Terminar", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "Cancelar", IDCANCEL,178,138,50,14
PUSHBUTTON "Ayuda", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -40,9 +40,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Assistant"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Terminer", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "&Suivant >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< &Prcdent", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "&Suivant >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "Terminer", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "Annuler", IDCANCEL,178,138,50,14
PUSHBUTTON "Aide", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -37,9 +37,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Wizard"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Fine", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "&Avanti >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< &Indietro", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "&Avanti >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "Fine", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "Anulla", IDCANCEL,178,138,50,14
PUSHBUTTON "Aiuto", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -36,9 +36,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Wizard"
FONT 9, "MS UI Gothic"
BEGIN
DEFPUSHBUTTON "完了", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "進む(&N) >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< 戻る(&B)", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "進む(&N) >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "完了", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "キャンセル", IDCANCEL,178,138,50,14
PUSHBUTTON "ヘルプ", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -36,9 +36,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Wizard"
FONT 9, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "종료", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "다음(&N) >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< 이전(&B)", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "다음(&N) >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "종료", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "취소", IDCANCEL,178,138,50,14
PUSHBUTTON "도움말", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -38,9 +38,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Assistent"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Beëindigen", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "&Volgende >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< V&orige", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "&Volgende >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "Beëindigen", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "Annuleren", IDCANCEL,178,138,50,14
PUSHBUTTON "Help", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -37,9 +37,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Kreator"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Zakocz", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "&Dalej >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< &Wstecz", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "&Dalej >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "Zakocz", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "Anuluj", IDCANCEL,178,138,50,14
PUSHBUTTON "Pomoc", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -36,9 +36,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Assistente"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Finalizar", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "&Avanar >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< &Voltar", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "&Avanar >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "Finalizar", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "Cancelar", IDCANCEL,178,138,50,14
PUSHBUTTON "Ajuda", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -38,9 +38,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION ""
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "& >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< &", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "& >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "", IDCANCEL,178,138,50,14
PUSHBUTTON "&", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -36,9 +36,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "arovnik"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Dokonaj", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "Naprej >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< Na&zaj", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "Naprej >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "Dokonaj", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "Preklii", IDCANCEL,178,138,50,14
PUSHBUTTON "Pomo", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -36,9 +36,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Guide"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Slutfr", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "&Nsta >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< &Fregende", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "&Nsta >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "Slutfr", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "Avbryt", IDCANCEL,178,138,50,14
PUSHBUTTON "Hjlp", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -36,9 +36,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Wizard"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON " >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< ͹Ѻ", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON " >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "¡ԡ", IDCANCEL,178,138,50,14
PUSHBUTTON "", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -38,9 +38,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION ""
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "&", IDC_FINISH_BUTTON,121,138,50,14
DEFPUSHBUTTON "& >", IDC_NEXT_BUTTON,121,138,50,14
PUSHBUTTON "< &", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "& >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "&", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "&³", IDCANCEL,178,138,50,14
PUSHBUTTON "&", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
......
......@@ -45,7 +45,6 @@
* o PSN_QUERYINITIALFOCUS
* o PSN_TRANSLATEACCELERATOR
* - Styles:
* o PSH_WIZARDHASFINISH
* o PSH_RTLREADING
* o PSH_STRETCHWATERMARK
* o PSH_USEPAGELANG
......@@ -121,6 +120,7 @@ typedef struct tagPropSheetInfo
BOOL isModeless;
BOOL hasHelp;
BOOL hasApply;
BOOL hasFinish;
BOOL useCallback;
BOOL restartWindows;
BOOL rebootSystem;
......@@ -233,13 +233,11 @@ static VOID PROPSHEET_UnImplementedFlags(DWORD dwFlags)
/*
* unhandled header flags:
* PSH_WIZARDHASFINISH 0x00000010
* PSH_RTLREADING 0x00000800
* PSH_STRETCHWATERMARK 0x00040000
* PSH_USEPAGELANG 0x00200000
*/
add_flag(PSH_WIZARDHASFINISH);
add_flag(PSH_RTLREADING);
add_flag(PSH_STRETCHWATERMARK);
add_flag(PSH_USEPAGELANG);
......@@ -341,6 +339,7 @@ static BOOL PROPSHEET_CollectSheetInfoA(LPCPROPSHEETHEADERA lppsh,
psInfo->hasHelp = dwFlags & PSH_HASHELP;
psInfo->hasApply = !(dwFlags & PSH_NOAPPLYNOW);
psInfo->hasFinish = dwFlags & PSH_WIZARDHASFINISH;
psInfo->useCallback = (dwFlags & PSH_USECALLBACK )&& (lppsh->pfnCallback);
psInfo->isModeless = dwFlags & PSH_MODELESS;
......@@ -396,6 +395,7 @@ static BOOL PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh,
psInfo->hasHelp = dwFlags & PSH_HASHELP;
psInfo->hasApply = !(dwFlags & PSH_NOAPPLYNOW);
psInfo->hasFinish = dwFlags & PSH_WIZARDHASFINISH;
psInfo->useCallback = (dwFlags & PSH_USECALLBACK) && (lppsh->pfnCallback);
psInfo->isModeless = dwFlags & PSH_MODELESS;
......@@ -1004,6 +1004,8 @@ static BOOL PROPSHEET_AdjustButtonsWizard(HWND hwndParent,
if (psInfo->hasHelp)
num_buttons++;
if (psInfo->hasFinish)
num_buttons++;
/*
* Obtain the size of the buttons.
......@@ -1024,40 +1026,47 @@ static BOOL PROPSHEET_AdjustButtonsWizard(HWND hwndParent,
* All buttons will be at this y coordinate.
*/
y = rcSheet.bottom - (padding.y + buttonHeight);
/*
* Position the Next and the Finish buttons.
* Position the Back button.
*/
hwndButton = GetDlgItem(hwndParent, IDC_NEXT_BUTTON);
hwndButton = GetDlgItem(hwndParent, IDC_BACK_BUTTON);
x = rcSheet.right - ((padding.x + buttonWidth) * (num_buttons - 1));
x = rcSheet.right - ((padding.x + buttonWidth) * (num_buttons - 1)) - buttonWidth;
SetWindowPos(hwndButton, 0, x, y, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
hwndButton = GetDlgItem(hwndParent, IDC_FINISH_BUTTON);
/*
* Position the Next button.
*/
hwndButton = GetDlgItem(hwndParent, IDC_NEXT_BUTTON);
x += buttonWidth;
SetWindowPos(hwndButton, 0, x, y, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
ShowWindow(hwndButton, SW_HIDE);
/*
* Position the Back button.
* Position the Finish button.
*/
hwndButton = GetDlgItem(hwndParent, IDC_BACK_BUTTON);
x -= buttonWidth;
hwndButton = GetDlgItem(hwndParent, IDC_FINISH_BUTTON);
if (psInfo->hasFinish)
x += padding.x + buttonWidth;
SetWindowPos(hwndButton, 0, x, y, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
if (!psInfo->hasFinish)
ShowWindow(hwndButton, SW_HIDE);
/*
* Position the Cancel button.
*/
hwndButton = GetDlgItem(hwndParent, IDCANCEL);
x = rcSheet.right - ((padding.x + buttonWidth) * (num_buttons - 2));
x += padding.x + buttonWidth;
SetWindowPos(hwndButton, 0, x, y, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
......@@ -1069,7 +1078,7 @@ static BOOL PROPSHEET_AdjustButtonsWizard(HWND hwndParent,
if (psInfo->hasHelp)
{
x = rcSheet.right - (padding.x + buttonWidth);
x += padding.x + buttonWidth;
SetWindowPos(hwndButton, 0, x, y, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
......@@ -2193,6 +2202,7 @@ static void PROPSHEET_SetTitleW(HWND hwndDlg, DWORD dwStyle, LPCWSTR lpszText)
*/
static void PROPSHEET_SetFinishTextA(HWND hwndDlg, LPCSTR lpszText)
{
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfoStr);
HWND hwndButton = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON);
TRACE("'%s'\n", lpszText);
......@@ -2208,9 +2218,12 @@ static void PROPSHEET_SetFinishTextA(HWND hwndDlg, LPCSTR lpszText)
hwndButton = GetDlgItem(hwndDlg, IDC_BACK_BUTTON);
ShowWindow(hwndButton, SW_HIDE);
/* Hide Next button */
hwndButton = GetDlgItem(hwndDlg, IDC_NEXT_BUTTON);
ShowWindow(hwndButton, SW_HIDE);
if (!psInfo->hasFinish)
{
/* Hide Next button */
hwndButton = GetDlgItem(hwndDlg, IDC_NEXT_BUTTON);
ShowWindow(hwndButton, SW_HIDE);
}
}
/******************************************************************************
......@@ -2218,6 +2231,7 @@ static void PROPSHEET_SetFinishTextA(HWND hwndDlg, LPCSTR lpszText)
*/
static void PROPSHEET_SetFinishTextW(HWND hwndDlg, LPCWSTR lpszText)
{
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfoStr);
HWND hwndButton = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON);
TRACE("'%s'\n", debugstr_w(lpszText));
......@@ -2233,9 +2247,12 @@ static void PROPSHEET_SetFinishTextW(HWND hwndDlg, LPCWSTR lpszText)
hwndButton = GetDlgItem(hwndDlg, IDC_BACK_BUTTON);
ShowWindow(hwndButton, SW_HIDE);
/* Hide Next button */
hwndButton = GetDlgItem(hwndDlg, IDC_NEXT_BUTTON);
ShowWindow(hwndButton, SW_HIDE);
if (!psInfo->hasFinish)
{
/* Hide Next button */
hwndButton = GetDlgItem(hwndDlg, IDC_NEXT_BUTTON);
ShowWindow(hwndButton, SW_HIDE);
}
}
/******************************************************************************
......@@ -2436,6 +2453,8 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
*/
static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
{
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg,
PropSheetInfoStr);
HWND hwndBack = GetDlgItem(hwndDlg, IDC_BACK_BUTTON);
HWND hwndNext = GetDlgItem(hwndDlg, IDC_NEXT_BUTTON);
HWND hwndFinish = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON);
......@@ -2451,8 +2470,11 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
if (dwFlags & PSWIZB_NEXT)
{
/* Hide the Finish button */
ShowWindow(hwndFinish, SW_HIDE);
if (!psInfo->hasFinish)
{
/* Hide the Finish button */
ShowWindow(hwndFinish, SW_HIDE);
}
/* Show and enable the Next button */
ShowWindow(hwndNext, SW_SHOW);
......@@ -2462,20 +2484,27 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
SendMessageW(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0);
}
if ((dwFlags & PSWIZB_FINISH) || (dwFlags & PSWIZB_DISABLEDFINISH))
if (!psInfo->hasFinish)
{
/* Hide the Next button */
ShowWindow(hwndNext, SW_HIDE);
/* Show the Finish button */
ShowWindow(hwndFinish, SW_SHOW);
if ((dwFlags & PSWIZB_FINISH) || (dwFlags & PSWIZB_DISABLEDFINISH))
{
/* Hide the Next button */
ShowWindow(hwndNext, SW_HIDE);
/* Show the Finish button */
ShowWindow(hwndFinish, SW_SHOW);
if (dwFlags & PSWIZB_FINISH)
EnableWindow(hwndFinish, TRUE);
if (!(dwFlags & PSWIZB_DISABLEDFINISH))
{
EnableWindow(hwndFinish, TRUE);
/* Set the Finish button as the default pushbutton */
SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
/* Set the Finish button as the default pushbutton */
SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
}
}
}
else if (!(dwFlags & PSWIZB_DISABLEDFINISH))
EnableWindow(hwndFinish, TRUE);
}
/******************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment