IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
+extern void wxAssociateWinWithHandle( HWND hWnd
+ ,wxWindowOS2* pWin
+ );
+
void wxRadioButton::Init()
{
m_bFocusJustSet = FALSE;
))
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
::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