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