]> git.saurik.com Git - wxWidgets.git/blob - src/msw/statline.cpp
Removed USING_CONFIGURE define. As VZ pointed out, checking HAVE_CONFIG_H
[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 #if wxUSE_STATLINE
33
34 #include "wx/msw/private.h"
35
36 // ============================================================================
37 // implementation
38 // ============================================================================
39
40 IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
41
42 // ----------------------------------------------------------------------------
43 // wxStaticLine
44 // ----------------------------------------------------------------------------
45
46 bool wxStaticLine::Create( wxWindow *parent,
47 wxWindowID id,
48 const wxPoint &pos,
49 const wxSize &size,
50 long style,
51 const wxString &name)
52 {
53 if ( !CreateBase(parent, id, pos, size, style, name) )
54 return FALSE;
55
56 parent->AddChild(this);
57
58 wxSize sizeReal = AdjustSize(size);
59
60 #ifndef WIN32
61 #define SS_SUNKEN 0
62 #endif
63
64 m_hWnd = (WXHWND)::CreateWindow
65 (
66 _T("STATIC"),
67 "",
68 WS_VISIBLE | WS_CHILD |
69 SS_GRAYRECT | SS_SUNKEN, // | SS_ETCHEDFRAME,
70 pos.x, pos.y, sizeReal.x, sizeReal.y,
71 GetWinHwnd(parent),
72 (HMENU)m_windowId,
73 wxGetInstance(),
74 NULL
75 );
76
77 if ( !m_hWnd )
78 {
79 wxLogDebug(_T("Failed to create static control"));
80
81 return FALSE;
82 }
83
84 SubclassWin(m_hWnd);
85
86 return TRUE;
87 }
88 #endif
89