From 4308c448d33e5de993586a4573f6810efdd26bbf Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Fri, 8 Dec 2017 15:44:03 +0000 Subject: [PATCH setup] Explicitly remove defpushbutton style from "Next" button when not default --- choose.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/choose.cc b/choose.cc index 4219a81..d7265cb 100644 --- a/choose.cc +++ b/choose.cc @@ -27,6 +27,7 @@ default. */ #include "win32.h" +#include "windowsx.h" #include #include #include @@ -386,14 +387,19 @@ ChooserPage::OnMessageCmd (int id, HWND hwndctl, UINT code) if (id == IDC_CHOOSE_SEARCH_EDIT) { + HWND nextButton = ::GetDlgItem(::GetParent(GetHWND()), 0x3024 /* ID_WIZNEXT */); + if (code == EN_CHANGE) { SendMessage (GetHWND (), DM_SETDEFID, (WPARAM) IDC_CHOOSE_DO_SEARCH, 0); + Button_SetStyle(nextButton, BS_PUSHBUTTON, TRUE); SetTimer(GetHWND (), timer_id, SEARCH_TIMER_DELAY, (TIMERPROC) NULL); } else if (code == EN_KILLFOCUS) - SendMessage (GetHWND (), DM_SETDEFID, (WPARAM) 0x3024 /* ID_WIZNEXT */, 0); - + { + SendMessage (GetHWND (), DM_SETDEFID, (WPARAM) 0x3024 /* ID_WIZNEXT */, 0); + Button_SetStyle(nextButton, BS_DEFPUSHBUTTON, TRUE); + } return true; } else if (code == BN_CLICKED) -- 2.15.1