]> git.saurik.com Git - wxWidgets.git/blame - src/msw/statline.cpp
*** empty log message ***
[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
32#include "wx/msw/private.h"
33
34// ============================================================================
35// implementation
36// ============================================================================
37
38IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
39
40// ----------------------------------------------------------------------------
41// wxStaticLine
42// ----------------------------------------------------------------------------
43
44bool 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
cc985fac
PA
58#ifndef WIN32
59#define SS_SUNKEN 0
60#endif
61
c50f1fb9
VZ
62 m_hWnd = (WXHWND)::CreateWindow
63 (
64 _T("STATIC"),
65 "",
66 WS_VISIBLE | WS_CHILD |
cc985fac 67 SS_GRAYRECT | SS_SUNKEN, // | SS_ETCHEDFRAME,
c50f1fb9
VZ
68 pos.x, pos.y, sizeReal.x, sizeReal.y,
69 GetWinHwnd(parent),
70 (HMENU)m_windowId,
71 wxGetInstance(),
72 NULL
73 );
74
75 if ( !m_hWnd )
76 {
77 wxLogDebug(_T("Failed to create static control"));
78
79 return FALSE;
80 }
81
82 SubclassWin(m_hWnd);
83
84 return TRUE;
85}
86