]>
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(!OS2CreateControl( pParent
54 if (!OS2CreateControl( "STATIC"
66 vColour
.Set(wxString("BLACK"));
68 LONG lColor
= (LONG
)vColour
.GetPixel();
70 ::WinSetPresParam( m_hWnd
75 lColor
= (LONG
)m_backgroundColour
.GetPixel();
77 ::WinSetPresParam( m_hWnd
82 wxFont
* pTextFont
= new wxFont( 10
95 } // end of wxStaticBox::Create
97 wxSize
wxStaticBox::DoGetBestSize() const
103 wxGetCharSize( GetHWND()
108 GetTextExtent( wxGetWindowText(m_hWnd
)
114 int hBox
= EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy
);
119 } // end of wxStaticBox::DoGetBestSize
121 MRESULT
wxStaticBox::OS2WindowProc(
127 return wxControl::OS2WindowProc(nMsg
, wParam
, lParam
);
128 } // end of wxStaticBox::OS2WindowProc