]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wxRadioButton::MSWWindowProc to reset m_focusJustSet -- otherwise,
authorJulian Smart <julian@anthemion.co.uk>
Fri, 5 Jul 2002 14:09:31 +0000 (14:09 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 5 Jul 2002 14:09:31 +0000 (14:09 +0000)
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

include/wx/msw/radiobut.h
src/msw/radiobut.cpp

index 1ffb17d75159d9724f855c6f2f368ca09d55b165..ea577bca889cb9d4f98b6e0156f95ccfdede10bd 100644 (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();
 
index 83e588ab4da4ff9118ee4de8c8683acc483c3170..f038fd099a7120cd59a975d0987a926a81349c72 100644 (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