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 */);