X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0fba44b4103530bd7904c4b5720b7568b753daec..7ea1c917764fb2588fe1aadc75c49ba300f8cb2f:/src/os2/statbox.cpp?ds=inline diff --git a/src/os2/statbox.cpp b/src/os2/statbox.cpp index cb5a1b6aa0..2464ee04b0 100644 --- a/src/os2/statbox.cpp +++ b/src/os2/statbox.cpp @@ -65,24 +65,20 @@ bool wxStaticBox::Create( SetBackgroundColour(GetParent()->GetBackgroundColour()); wxColour vColour; - vColour.Set(wxString(wxT("BLACK"))); - LONG lColor = (LONG)vColour.GetPixel(); - ::WinSetPresParam( m_hWnd ,PP_FOREGROUNDCOLOR ,sizeof(LONG) ,(PVOID)&lColor ); - lColor = (LONG)m_backgroundColour.GetPixel(); + lColor = (LONG)m_backgroundColour.GetPixel(); ::WinSetPresParam( m_hWnd ,PP_BACKGROUNDCOLOR ,sizeof(LONG) ,(PVOID)&lColor ); - SetFont(*wxSMALL_FONT); SetSize( rPos.x ,rPos.y ,rSize.x @@ -96,16 +92,12 @@ wxSize wxStaticBox::DoGetBestSize() const int nCx; int nCy; int wBox; - wxFont vFont = GetFont(); - wxGetCharSize( GetHWND() - ,&nCx - ,&nCy - ,&vFont - ); + nCx = GetCharWidth(); + nCy = GetCharHeight(); GetTextExtent( wxGetWindowText(m_hWnd) ,&wBox - ,&nCy + ,NULL ); wBox += 3 * nCx;