From 73927f8bac6a9392855eb20def7cf2a0049c05e4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 18 Jul 1999 21:48:31 +0000 Subject: [PATCH] Enter won't close dialog if [Ok] button is disabled git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 0442867815..5f6bf803cf 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1540,7 +1540,7 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg) btn = panel->GetDefaultItem(); } - if ( btn ) + if ( btn && btn->IsEnabled() ) { // if we do have a default button, do press it btn->MSWCommand(BN_CLICKED, 0 /* unused */);