Robert Shearman : comctl32:
Make sure to always have the default pushbutton for wizards as an
enabled button .
Alexandre Julliard
julliard at wine.codeweavers.com
Mon May 22 05:19:11 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: a247e6975f367af7b4022623a277dd8824c699da
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=a247e6975f367af7b4022623a277dd8824c699da
Author: Robert Shearman <rob at codeweavers.com>
Date: Sat May 20 15:31:10 2006 +0100
comctl32: Make sure to always have the default pushbutton for wizards as an enabled button.
---
dlls/comctl32/propsheet.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index a253099..acee9bf 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -2433,17 +2433,23 @@ static void PROPSHEET_SetWizButtons(HWND
EnableWindow(hwndNext, FALSE);
EnableWindow(hwndFinish, FALSE);
+ /* set the default pushbutton to an enabled button */
+ if (((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH))
+ SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
+ else if (dwFlags & PSWIZB_NEXT)
+ SendMessageW(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0);
+ else if (dwFlags & PSWIZB_BACK)
+ SendMessageW(hwndDlg, DM_SETDEFID, IDC_BACK_BUTTON, 0);
+ else
+ SendMessageW(hwndDlg, DM_SETDEFID, IDCANCEL, 0);
+
+
if (dwFlags & PSWIZB_BACK)
EnableWindow(hwndBack, TRUE);
if (dwFlags & PSWIZB_NEXT)
- {
EnableWindow(hwndNext, TRUE);
- /* Set the Next button as the default pushbutton */
- SendMessageW(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0);
- }
-
if (!psInfo->hasFinish)
{
if ((dwFlags & PSWIZB_FINISH) || (dwFlags & PSWIZB_DISABLEDFINISH))
@@ -2455,12 +2461,7 @@ static void PROPSHEET_SetWizButtons(HWND
ShowWindow(hwndFinish, SW_SHOW);
if (!(dwFlags & PSWIZB_DISABLEDFINISH))
- {
EnableWindow(hwndFinish, TRUE);
-
- /* Set the Finish button as the default pushbutton */
- SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
- }
}
else
{
More information about the wine-cvs
mailing list