]> git.saurik.com Git - wxWidgets.git/blob - src/msw/statline.cpp
wxGTK compile fixes for my wxMSW changes
[wxWidgets.git] / src / msw / statline.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: msw/statline.cpp
3 // Purpose: MSW version of wxStaticLine class
4 // Author: Vadim Zeitlin
5 // Created: 28.06.99
6 // Version: $Id$
7 // Copyright: (c) 1998 Vadim Zeitlin
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // ============================================================================
12 // declarations
13 // ============================================================================
14
15 // ----------------------------------------------------------------------------
16 // headers
17 // ----------------------------------------------------------------------------
18
19 #ifdef __GNUG__
20 #pragma implementation "statline.h"
21 #endif
22
23 // For compilers that support precompilation, includes "wx.h".
24 #include "wx/wxprec.h"
25
26 #ifdef __BORLANDC__
27 #pragma hdrstop
28 #endif
29
30 #include "wx/statline.h"
31
32 #include "wx/msw/private.h"
33
34 // ============================================================================
35 // implementation
36 // ============================================================================
37
38 IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
39
40 // ----------------------------------------------------------------------------
41 // wxStaticLine
42 // ----------------------------------------------------------------------------
43
44 bool wxStaticLine::Create( wxWindow *parent,
45 wxWindowID id,
46 const wxPoint &pos,
47 const wxSize &size,
48 long style,
49 const wxString &name)
50 {
51 if ( !CreateBase(parent, id, pos, size, style, name) )
52 return FALSE;
53
54 parent->AddChild(this);
55
56 wxSize sizeReal = AdjustSize(size);
57
58 m_hWnd = (WXHWND)::CreateWindow
59 (
60 _T("STATIC"),
61 "",
62 WS_VISIBLE | WS_CHILD |
63 SS_GRAYRECT | SS_SUNKEN,// | SS_ETCHEDFRAME,
64 pos.x, pos.y, sizeReal.x, sizeReal.y,
65 GetWinHwnd(parent),
66 (HMENU)m_windowId,
67 wxGetInstance(),
68 NULL
69 );
70
71 if ( !m_hWnd )
72 {
73 wxLogDebug(_T("Failed to create static control"));
74
75 return FALSE;
76 }
77
78 SubclassWin(m_hWnd);
79
80 return TRUE;
81 }
82