git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8868
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
}
else if ( lDlgCode & DLGC_BUTTON )
{
}
else if ( lDlgCode & DLGC_BUTTON )
{
- // buttons want process Enter themselevs
+ // let IsDialogMessage() handle this for all
+ // buttons except the owner-drawn ones which it
+ // just seems to ignore
+ long style = ::GetWindowLong(msg->hwnd, GWL_STYLE);
+ if ( (style & BS_OWNERDRAW) == BS_OWNERDRAW )
+ {
+ // emulate the button click
+ wxWindow *btn = wxFindWinFromHandle((WXHWND)msg->hwnd);
+ if ( btn )
+ btn->MSWCommand(BN_CLICKED, 0 /* unused */);
+ }
+