]> git.saurik.com Git - wxWidgets.git/blame - src/os2/statline.cpp
reverted the previous fix, it's no longer needed now after the change to the default...
[wxWidgets.git] / src / os2 / statline.cpp
CommitLineData
a66ebb5b
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: msw/statline.cpp
3// Purpose: OS2 version of wxStaticLine class
4// Author: David Webster
5// Created: 10/23/99
6// Version: $Id$
7// Copyright: (c) 1999 David Webster
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11// ============================================================================
12// declarations
13// ============================================================================
14
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
aa213887
SN
19#ifdef __GNUG__
20 #pragma implementation "statline.h"
21#endif
22
a66ebb5b
DW
23// For compilers that support precompilation, includes "wx.h".
24#include "wx/wxprec.h"
25
26#include "wx/statline.h"
27
28#if wxUSE_STATLINE
29
30#include "wx/os2/private.h"
31#include "wx/log.h"
32
33// ============================================================================
34// implementation
35// ============================================================================
36
37IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
38
39// ----------------------------------------------------------------------------
40// wxStaticLine
41// ----------------------------------------------------------------------------
42
3c299c3a
DW
43bool wxStaticLine::Create(
44 wxWindow* pParent
45, wxWindowID vId
46, const wxPoint& rPos
47, const wxSize& rSize
48, long lStyle
49, const wxString& rsName
50)
a66ebb5b 51{
3c299c3a
DW
52 if (!CreateBase( pParent
53 ,vId
54 ,rPos
55 ,rSize
56 ,lStyle
57 ,wxDefaultValidator
58 ,rsName
59 ))
a66ebb5b
DW
60 return FALSE;
61
3c299c3a
DW
62 pParent->AddChild(this);
63
64 wxSize vSizeReal = AdjustSize(rSize);
65
66 m_hWnd = (WXHWND)::WinCreateWindow( GetWinHwnd(pParent)
67 ,WC_STATIC
68 ,""
69 ,WS_VISIBLE | SS_TEXT | DT_VCENTER | DT_CENTER
d8a3f66c
DW
70 ,0
71 ,0
72 ,0
73 ,0
3c299c3a
DW
74 ,GetWinHwnd(pParent)
75 ,HWND_TOP
76 ,(ULONG)m_windowId
77 ,NULL
78 ,NULL
79 );
a66ebb5b
DW
80 if ( !m_hWnd )
81 {
a66ebb5b 82 wxLogDebug(wxT("Failed to create static control"));
a66ebb5b
DW
83 return FALSE;
84 }
a66ebb5b 85 SubclassWin(m_hWnd);
d8a3f66c
DW
86 SetSize( rPos.x
87 ,rPos.y
88 ,rSize.x
89 ,rSize.y
90 );
a66ebb5b 91 return TRUE;
3c299c3a 92} // end of wxStaticLine::Create
a66ebb5b 93
3c299c3a 94#endif // wxUSE_STATLINE