X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d0edc0f7306aac10a75c545f9cace25d3cee83d..cd3c2375e6fddd3d478a6776900c21aaeb2d0f08:/src/os2/checkbox.cpp diff --git a/src/os2/checkbox.cpp b/src/os2/checkbox.cpp index 40eac8c614..bfc9f835ad 100644 --- a/src/os2/checkbox.cpp +++ b/src/os2/checkbox.cpp @@ -29,6 +29,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) +extern void wxAssociateWinWithHandle( HWND hWnd + ,wxWindowOS2* pWin + ); + // ============================================================================ // implementation // ============================================================================ @@ -64,6 +68,9 @@ bool wxCheckBox::Create( , const wxString& rsName ) { + LONG lColor; + bool bOk; + if (!CreateControl( pParent ,vId ,rPos @@ -76,17 +83,27 @@ bool wxCheckBox::Create( )) return FALSE; + long osStyle = BS_AUTOCHECKBOX | WS_TABSTOP | WS_VISIBLE; - return OS2CreateControl( wxT("BUTTON") - ,osStyle - ,rPos - ,rSize - ,rsLabel - ,0 - ); + bOk = OS2CreateControl( wxT("BUTTON") + ,osStyle + ,rPos + ,rSize + ,rsLabel + ,0 + ); + m_backgroundColour = pParent->GetBackgroundColour(); + lColor = (LONG)m_backgroundColour.GetPixel(); + ::WinSetPresParam( m_hWnd + ,PP_BACKGROUNDCOLOR + ,sizeof(LONG) + ,(PVOID)&lColor + ); + wxAssociateWinWithHandle(m_hWnd, this); + return bOk; } // end of wxCheckBox::Create void wxCheckBox::SetLabel(