]>
Commit | Line | Data |
---|---|---|
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 | 36 | |
f6bcfd97 BP |
37 | #ifndef SS_SUNKEN |
38 | #define SS_SUNKEN 0x00001000L | |
39 | #endif | |
40 | ||
41 | #ifndef SS_NOTIFY | |
42 | #define SS_NOTIFY 0x00000100L | |
43 | #endif | |
44 | ||
c50f1fb9 VZ |
45 | // ============================================================================ |
46 | // implementation | |
47 | // ============================================================================ | |
48 | ||
49 | IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl) | |
50 | ||
51 | // ---------------------------------------------------------------------------- | |
52 | // wxStaticLine | |
53 | // ---------------------------------------------------------------------------- | |
54 | ||
55 | bool wxStaticLine::Create( wxWindow *parent, | |
56 | wxWindowID id, | |
57 | const wxPoint &pos, | |
58 | const wxSize &size, | |
59 | long style, | |
60 | const wxString &name) | |
61 | { | |
8d99be5f | 62 | if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) ) |
c50f1fb9 VZ |
63 | return FALSE; |
64 | ||
65 | parent->AddChild(this); | |
66 | ||
67 | wxSize sizeReal = AdjustSize(size); | |
68 | ||
69 | m_hWnd = (WXHWND)::CreateWindow | |
70 | ( | |
223d09f6 KB |
71 | wxT("STATIC"), |
72 | wxT(""), | |
f6bcfd97 BP |
73 | WS_VISIBLE | WS_CHILD /* | WS_CLIPSIBLINGS */ | |
74 | SS_GRAYRECT | SS_SUNKEN | SS_NOTIFY, | |
c50f1fb9 VZ |
75 | pos.x, pos.y, sizeReal.x, sizeReal.y, |
76 | GetWinHwnd(parent), | |
77 | (HMENU)m_windowId, | |
78 | wxGetInstance(), | |
79 | NULL | |
80 | ); | |
81 | ||
82 | if ( !m_hWnd ) | |
83 | { | |
223d09f6 | 84 | wxLogDebug(wxT("Failed to create static control")); |
f6bcfd97 | 85 | |
c50f1fb9 VZ |
86 | return FALSE; |
87 | } | |
88 | ||
89 | SubclassWin(m_hWnd); | |
90 | ||
91 | return TRUE; | |
92 | } | |
f6bcfd97 BP |
93 | |
94 | #endif // wxUSE_STATLINE | |
c50f1fb9 | 95 |