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