]>
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
7 // Copyright: (c) David Webster
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
14 #include "wx/statbox.h"
18 #include "wx/dcclient.h"
19 #include "wx/window.h"
22 #include "wx/os2/private.h"
24 bool wxStaticBox::Create( wxWindow
* pParent
,
26 const wxString
& rsLabel
,
30 const wxString
& rsName
)
32 if(!CreateControl( pParent
47 if (!OS2CreateControl( wxT("STATIC")
58 // To be transparent we should have the same colour as the parent as well
60 SetBackgroundColour(GetParent()->GetBackgroundColour());
62 LONG lColor
= (LONG
)wxBLACK
->GetPixel();
63 ::WinSetPresParam( m_hWnd
69 lColor
= (LONG
)m_backgroundColour
.GetPixel();
70 ::WinSetPresParam( m_hWnd
81 } // end of wxStaticBox::Create
83 wxSize
wxStaticBox::DoGetBestSize() const
90 nCy
= GetCharHeight();
91 GetTextExtent( wxGetWindowText(m_hWnd
)
97 int hBox
= EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy
);
102 } // end of wxStaticBox::DoGetBestSize
104 MRESULT
wxStaticBox::OS2WindowProc( WXUINT nMsg
,
108 return wxControl::OS2WindowProc(nMsg
, wParam
, lParam
);
109 } // end of wxStaticBox::OS2WindowProc