]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/msw/statline.cpp
Compilaton fixes.
[wxWidgets.git] / src / msw / statline.cpp
... / ...
CommitLineData
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#include "wx/log.h"
36
37#ifndef SS_SUNKEN
38 #define SS_SUNKEN 0x00001000L
39#endif
40
41#ifndef SS_NOTIFY
42 #define SS_NOTIFY 0x00000100L
43#endif
44
45// ============================================================================
46// implementation
47// ============================================================================
48
49IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
50
51// ----------------------------------------------------------------------------
52// wxStaticLine
53// ----------------------------------------------------------------------------
54
55bool wxStaticLine::Create(wxWindow *parent,
56 wxWindowID id,
57 const wxPoint& pos,
58 const wxSize& sizeOrig,
59 long style,
60 const wxString &name)
61{
62 wxSize size = AdjustSize(sizeOrig);
63
64 if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
65 return FALSE;
66
67 return MSWCreateControl(_T("STATIC"), wxEmptyString, pos, size);
68}
69
70WXDWORD wxStaticLine::MSWGetStyle(long style, WXDWORD *exstyle) const
71{
72 // we never have border
73 style &= ~wxBORDER_MASK;
74 style |= wxBORDER_NONE;
75
76 WXDWORD msStyle = wxControl::MSWGetStyle(style, exstyle);
77
78 // add our default styles
79 msStyle |= SS_SUNKEN | SS_NOTIFY | WS_CLIPSIBLINGS;
80#ifndef __WXWINCE__
81 msStyle |= SS_GRAYRECT ;
82#endif
83
84 return msStyle ;
85}
86
87#endif // wxUSE_STATLINE
88