]>
git.saurik.com Git - wxWidgets.git/blob - src/os2/statbox.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/os2/statbox.cpp
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/statbox.h"
19 #include "wx/dcclient.h"
22 #include "wx/window.h"
23 #include "wx/os2/private.h"
25 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox
, wxControl
)
27 bool wxStaticBox::Create( wxWindow
* pParent
,
29 const wxString
& rsLabel
,
33 const wxString
& rsName
)
35 if(!CreateControl( pParent
50 if (!OS2CreateControl( wxT("STATIC")
61 // To be transparent we should have the same colour as the parent as well
63 SetBackgroundColour(GetParent()->GetBackgroundColour());
66 vColour
.Set(wxString(wxT("BLACK")));
67 LONG lColor
= (LONG
)vColour
.GetPixel();
68 ::WinSetPresParam( m_hWnd
74 lColor
= (LONG
)m_backgroundColour
.GetPixel();
75 ::WinSetPresParam( m_hWnd
86 } // end of wxStaticBox::Create
88 wxSize
wxStaticBox::DoGetBestSize() const
95 nCy
= GetCharHeight();
96 GetTextExtent( wxGetWindowText(m_hWnd
)
102 int hBox
= EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy
);
107 } // end of wxStaticBox::DoGetBestSize
109 MRESULT
wxStaticBox::OS2WindowProc( WXUINT nMsg
,
113 return wxControl::OS2WindowProc(nMsg
, wParam
, lParam
);
114 } // end of wxStaticBox::OS2WindowProc