]>
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"
20 #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());
65 LONG lColor
= (LONG
)wxBLACK
->GetPixel();
66 ::WinSetPresParam( m_hWnd
72 lColor
= (LONG
)m_backgroundColour
.GetPixel();
73 ::WinSetPresParam( m_hWnd
84 } // end of wxStaticBox::Create
86 wxSize
wxStaticBox::DoGetBestSize() const
93 nCy
= GetCharHeight();
94 GetTextExtent( wxGetWindowText(m_hWnd
)
100 int hBox
= EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy
);
105 } // end of wxStaticBox::DoGetBestSize
107 MRESULT
wxStaticBox::OS2WindowProc( WXUINT nMsg
,
111 return wxControl::OS2WindowProc(nMsg
, wParam
, lParam
);
112 } // end of wxStaticBox::OS2WindowProc