don't process enter as tab, there are many controls which want to process it themselves

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2001-08-07 00:14:45 +00:00
parent 9948d31f4e
commit 91a62137b1

View File

@ -1845,9 +1845,9 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
} }
// FIXME: this should be handled by // FIXME: this should be handled by
// wxNavigationKeyEvent handler and not here!! // wxNavigationKeyEvent handler and not here!!
#if wxUSE_BUTTON
else else
{ {
#if wxUSE_BUTTON
wxButton *btn = wxDynamicCast(GetDefaultItem(), wxButton *btn = wxDynamicCast(GetDefaultItem(),
wxButton); wxButton);
if ( btn && btn->IsEnabled() ) if ( btn && btn->IsEnabled() )
@ -1857,11 +1857,15 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
return TRUE; return TRUE;
} }
// else: but if it does not it makes sense to make else // no default button
// it work like a TAB - and that's what we do.
// Note that Ctrl-Enter always works this way.
}
#endif // wxUSE_BUTTON #endif // wxUSE_BUTTON
{
// no special function for enter and don't even
// let IsDialogMessage() have it: it seems to
// do something really strange with it
return FALSE;
}
}
} }
break; break;
@ -1882,7 +1886,7 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
} }
} }
} }
#else #else // 0
// let ::IsDialogMessage() do almost everything and handle just the // let ::IsDialogMessage() do almost everything and handle just the
// things it doesn't here: Ctrl-TAB for switching notebook pages // things it doesn't here: Ctrl-TAB for switching notebook pages
if ( msg->message == WM_KEYDOWN ) if ( msg->message == WM_KEYDOWN )
@ -1910,7 +1914,7 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
} }
} }
} }
#endif // 0 #endif // 1/0
if ( ::IsDialogMessage(GetHwnd(), msg) ) if ( ::IsDialogMessage(GetHwnd(), msg) )
{ {