]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/statbox.cpp
using new API (no visual difference)
[wxWidgets.git] / src / os2 / statbox.cpp
index cb5a1b6aa0e7802e06546adc270b44e7f54d75e8..2464ee04b0ca65132b865fdeacce365a13c1b0bc 100644 (file)
@@ -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;