]> git.saurik.com Git - wxWidgets.git/blob - src/msw/statline.cpp
Recognize VC12 (a.k.a. MSVS 2013) and define __VISUALC12__ for it.
[wxWidgets.git] / src / msw / statline.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/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 // For compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
21
22 #ifdef __BORLANDC__
23 #pragma hdrstop
24 #endif
25
26 #include "wx/statline.h"
27
28 #if wxUSE_STATLINE
29
30 #ifndef WX_PRECOMP
31 #include "wx/msw/private.h"
32 #include "wx/msw/missing.h"
33 #endif
34
35 // ============================================================================
36 // implementation
37 // ============================================================================
38
39 // ----------------------------------------------------------------------------
40 // wxStaticLine
41 // ----------------------------------------------------------------------------
42
43 bool wxStaticLine::Create(wxWindow *parent,
44 wxWindowID id,
45 const wxPoint& pos,
46 const wxSize& sizeOrig,
47 long style,
48 const wxString &name)
49 {
50 wxSize size = AdjustSize(sizeOrig);
51
52 if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
53 return false;
54
55 return MSWCreateControl(wxT("STATIC"), wxEmptyString, pos, size);
56 }
57
58 WXDWORD wxStaticLine::MSWGetStyle(long style, WXDWORD *exstyle) const
59 {
60 // we never have border
61 style &= ~wxBORDER_MASK;
62 style |= wxBORDER_NONE;
63
64 WXDWORD msStyle = wxControl::MSWGetStyle(style, exstyle);
65
66 // add our default styles
67 msStyle |= SS_SUNKEN | SS_NOTIFY | WS_CLIPSIBLINGS;
68 #ifndef __WXWINCE__
69 msStyle |= SS_GRAYRECT ;
70 #endif
71
72 return msStyle ;
73 }
74
75 #endif // wxUSE_STATLINE