]> git.saurik.com Git - wxWidgets.git/blame - src/os2/statline.cpp
Fix recreating of wxBitmapComboBox using untyped client data.
[wxWidgets.git] / src / os2 / statline.cpp
CommitLineData
a66ebb5b 1/////////////////////////////////////////////////////////////////////////////
e4db172a 2// Name: src/os2/statline.cpp
a66ebb5b
DW
3// Purpose: OS2 version of wxStaticLine class
4// Author: David Webster
5// Created: 10/23/99
a66ebb5b 6// Copyright: (c) 1999 David Webster
65571936 7// Licence: wxWindows licence
a66ebb5b
DW
8/////////////////////////////////////////////////////////////////////////////
9
10// ============================================================================
11// declarations
12// ============================================================================
13
14// ----------------------------------------------------------------------------
15// headers
16// ----------------------------------------------------------------------------
17
18// For compilers that support precompilation, includes "wx.h".
19#include "wx/wxprec.h"
20
e4db172a
WS
21#if wxUSE_STATLINE
22
a66ebb5b
DW
23#include "wx/statline.h"
24
e4db172a
WS
25#ifndef WX_PRECOMP
26 #include "wx/log.h"
27#endif
a66ebb5b
DW
28
29#include "wx/os2/private.h"
a66ebb5b
DW
30
31// ============================================================================
32// implementation
33// ============================================================================
34
a66ebb5b
DW
35// ----------------------------------------------------------------------------
36// wxStaticLine
37// ----------------------------------------------------------------------------
38
3c299c3a
DW
39bool wxStaticLine::Create(
40 wxWindow* pParent
41, wxWindowID vId
42, const wxPoint& rPos
43, const wxSize& rSize
44, long lStyle
45, const wxString& rsName
46)
a66ebb5b 47{
b9b1d6c8 48 wxSize vSize = AdjustSize(rSize);
3c299c3a 49
b9b1d6c8
DW
50 if ( !CreateControl( pParent
51 ,vId
52 ,rPos
53 ,vSize
54 ,lStyle
55 ,wxDefaultValidator
56 ,rsName
57 ))
a66ebb5b 58 return FALSE;
0fba44b4 59 if (!OS2CreateControl( wxT("STATIC")
70a2c656
DW
60 ,SS_FGNDFRAME
61 ,rPos
62 ,rSize
63 ,rsName
64 ))
65 return FALSE;
66
67 wxColour vColour;
68
0fba44b4 69 vColour.Set(wxString(wxT("GREY")));
70a2c656
DW
70
71 LONG lColor = (LONG)vColour.GetPixel();
72
73 ::WinSetPresParam( m_hWnd
74 ,PP_FOREGROUNDCOLOR
75 ,sizeof(LONG)
76 ,(PVOID)&lColor
77 );
78 return TRUE;
3c299c3a 79} // end of wxStaticLine::Create
a66ebb5b 80
b9b1d6c8
DW
81WXDWORD wxStaticLine::OS2GetStyle(
82 long lStyle
83, WXDWORD* pdwExstyle
84) const
85{
86 //
87 // We never have border
88 //
89 lStyle &= ~wxBORDER_MASK;
90 lStyle |= wxBORDER_NONE;
91
92 WXDWORD dwStyle = wxControl::OS2GetStyle( lStyle
93 ,pdwExstyle
94 );
95 //
96 // Add our default styles
97 //
98 return dwStyle | WS_CLIPSIBLINGS;
99}
3c299c3a 100#endif // wxUSE_STATLINE