]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/radiobut.cpp
Added size_t cast to disambiguate array usage.
[wxWidgets.git] / src / os2 / radiobut.cpp
index 1f48c70a66e373496d707daccde91b9ea0108750..0b8784621c5f4a493388bfe26cf85f2ca90e0656 100644 (file)
 
 IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
 
+extern void  wxAssociateWinWithHandle( HWND         hWnd
+                                      ,wxWindowOS2* pWin
+                                     );
+
 void wxRadioButton::Init()
 {
     m_bFocusJustSet = FALSE;
@@ -82,6 +86,7 @@ bool wxRadioButton::Create(
                          ))
         return FALSE;
 
+    wxAssociateWinWithHandle(m_hWnd, this);
     if (HasFlag(wxRB_GROUP))
         SetValue(TRUE);
 
@@ -187,3 +192,26 @@ void wxRadioButton::SetValue(
     ::WinSendMsg((HWND)GetHWND(), BM_SETCHECK, (MPARAM)bValue, (MPARAM)0);
 } // end of wxRadioButton::SetValue
 
+MRESULT wxRadioButton::OS2WindowProc(
+  WXUINT                            uMsg
+, WXWPARAM                          wParam
+, WXLPARAM                          lParam
+)
+{
+    if (uMsg == WM_SETFOCUS)
+    {
+        m_bFocusJustSet = TRUE;
+
+        MRESULT                     mRc = wxControl::OS2WindowProc( uMsg
+                                                                   ,wParam
+                                                                   ,lParam
+                                                                  );
+
+        m_bFocusJustSet = FALSE;
+        return mRc;
+    }
+    return wxControl::OS2WindowProc( uMsg
+                                    ,wParam
+                                    ,lParam
+                                   );
+} // end of wxRadioButton::OS2WindowProc