git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35315
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- else if ( lDlgCode & DLGC_BUTTON )
+
+ // currently active button should get enter press even
+ // if there is a default button elsewhere
+ if ( lDlgCode & DLGC_DEFPUSHBUTTON )
{
// let IsDialogMessage() handle this for all
// buttons except the owner-drawn ones which it
{
// let IsDialogMessage() handle this for all
// buttons except the owner-drawn ones which it
if ( (style & BS_OWNERDRAW) == BS_OWNERDRAW )
{
// emulate the button click
if ( (style & BS_OWNERDRAW) == BS_OWNERDRAW )
{
// emulate the button click
- wxWindow *btn = wxFindWinFromHandle((WXHWND)msg->hwnd);
+ wxWindow *
+ btn = wxFindWinFromHandle((WXHWND)msg->hwnd);
if ( btn )
btn->MSWCommand(BN_CLICKED, 0 /* unused */);
}
bProcess = false;
}
if ( btn )
btn->MSWCommand(BN_CLICKED, 0 /* unused */);
}
bProcess = false;
}
- // FIXME: this should be handled by
- // wxNavigationKeyEvent handler and not here!
- else
+ else // not a button itself
{
#if wxUSE_BUTTON
wxButton *btn = wxDynamicCast(GetDefaultItem(),
{
#if wxUSE_BUTTON
wxButton *btn = wxDynamicCast(GetDefaultItem(),