]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/radiobut.cpp
fixed bug due to which all items in a virtual control stayed sometimes selected even...
[wxWidgets.git] / src / msw / radiobut.cpp
index 4cdecd98cf4dec7e00caf4a0551c9eedaae88180..f038fd099a7120cd59a975d0987a926a81349c72 100644 (file)
 // ----------------------------------------------------------------------------
 
 #ifdef __GNUG__
-    #pragma implementation "radiobut.h"
+#pragma implementation "radiobut.h"
 #endif
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
-    #pragma hdrstop
+#pragma hdrstop
 #endif
 
 #if wxUSE_RADIOBTN
 
 #ifndef WX_PRECOMP
-    #include "wx/radiobut.h"
-    #include "wx/settings.h"
-    #include "wx/brush.h"
+#include "wx/radiobut.h"
+#include "wx/settings.h"
+#include "wx/brush.h"
+#include "wx/dcscreen.h"
 #endif
 
 #include "wx/msw/private.h"
@@ -187,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