X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b3260bce473ab247edd8ca1d3aee4eb648b4b97e..cfce733e1732b46ebb076ef10fae5a7d552dc2f9:/src/os2/radiobut.cpp diff --git a/src/os2/radiobut.cpp b/src/os2/radiobut.cpp index f30fb7e201..0b8784621c 100644 --- a/src/os2/radiobut.cpp +++ b/src/os2/radiobut.cpp @@ -29,6 +29,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) +extern void wxAssociateWinWithHandle( HWND hWnd + ,wxWindowOS2* pWin + ); + void wxRadioButton::Init() { m_bFocusJustSet = FALSE; @@ -82,21 +86,16 @@ bool wxRadioButton::Create( )) return FALSE; + wxAssociateWinWithHandle(m_hWnd, this); if (HasFlag(wxRB_GROUP)) SetValue(TRUE); - wxFont* pTextFont = new wxFont( 10 - ,wxMODERN - ,wxNORMAL - ,wxNORMAL - ); - SetFont(*pTextFont); + SetFont(*wxSMALL_FONT); SetSize( rPos.x ,rPos.y ,rSize.x ,rSize.y ); - delete pTextFont; return TRUE; } // end of wxRadioButton::Create @@ -193,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