X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b086de1460fd46c21a432ac3d8dec2759e5d05a..ad603bf790cdfb219bf566f304ff4593fe8d1532:/src/os2/radiobut.cpp diff --git a/src/os2/radiobut.cpp b/src/os2/radiobut.cpp index f06181dd45..0b8784621c 100644 --- a/src/os2/radiobut.cpp +++ b/src/os2/radiobut.cpp @@ -21,12 +21,18 @@ #include "wx/setup.h" #include "wx/radiobut.h" #include "wx/brush.h" +#include "wx/dcscreen.h" +#include "wx/settings.h" #endif #include "wx/os2/private.h" IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) +extern void wxAssociateWinWithHandle( HWND hWnd + ,wxWindowOS2* pWin + ); + void wxRadioButton::Init() { m_bFocusJustSet = FALSE; @@ -80,6 +86,7 @@ bool wxRadioButton::Create( )) return FALSE; + wxAssociateWinWithHandle(m_hWnd, this); if (HasFlag(wxRB_GROUP)) SetValue(TRUE); @@ -185,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