Added wxRadioButton::MSWWindowProc to reset m_focusJustSet -- otherwise,

if RB1 has the focus, then you click on RB2, then back on RB1, no
command event will be generated for the last click.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2002-07-05 14:09:31 +00:00
parent b8b7f03cef
commit aca78774b6
2 changed files with 16 additions and 0 deletions

View File

@ -52,6 +52,7 @@ public:
// implementation only from now on
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual void Command(wxCommandEvent& event);
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
virtual void SetFocus();

View File

@ -188,4 +188,19 @@ wxSize wxRadioButton::DoGetBestSize() const
return wxSize(wRadio, hRadio);
}
long wxRadioButton::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
if (nMsg == WM_SETFOCUS)
{
m_focusJustSet = TRUE;
long ret = wxControl::MSWWindowProc(nMsg, wParam, lParam);
m_focusJustSet = FALSE;
return ret;
}
return wxControl::MSWWindowProc(nMsg, wParam, lParam);
}
#endif // wxUSE_RADIOBTN