]>
git.saurik.com Git - wxWidgets.git/blob - src/os2/statbox.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxStaticBox
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
15 #include "wx/window.h"
16 #include "wx/os2/private.h"
20 #include "wx/dcclient.h"
23 #include "wx/statbox.h"
25 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox
, wxControl
)
27 bool wxStaticBox::Create(
30 , const wxString
& rsLabel
34 , const wxString
& rsName
37 if(!CreateControl( pParent
52 if (!OS2CreateControl( wxT("STATIC")
63 // To be transparent we should have the same colour as the parent as well
65 SetBackgroundColour(GetParent()->GetBackgroundColour());
69 vColour
.Set(wxString(wxT("BLACK")));
71 LONG lColor
= (LONG
)vColour
.GetPixel();
73 ::WinSetPresParam( m_hWnd
78 lColor
= (LONG
)m_backgroundColour
.GetPixel();
80 ::WinSetPresParam( m_hWnd
85 SetFont(*wxSMALL_FONT
);
92 } // end of wxStaticBox::Create
94 wxSize
wxStaticBox::DoGetBestSize() const
99 wxFont vFont
= GetFont();
101 wxGetCharSize( GetHWND()
106 GetTextExtent( wxGetWindowText(m_hWnd
)
112 int hBox
= EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy
);
117 } // end of wxStaticBox::DoGetBestSize
119 MRESULT
wxStaticBox::OS2WindowProc(
125 return wxControl::OS2WindowProc(nMsg
, wParam
, lParam
);
126 } // end of wxStaticBox::OS2WindowProc