]> git.saurik.com Git - wxWidgets.git/blob - src/os2/statline.cpp
don't use the return result of wxLocaltime_r, we receive the output in second paramet...
[wxWidgets.git] / src / os2 / statline.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: msw/statline.cpp
3 // Purpose: OS2 version of wxStaticLine class
4 // Author: David Webster
5 // Created: 10/23/99
6 // Version: $Id$
7 // Copyright: (c) 1999 David Webster
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 #include "wx/statline.h"
23
24 #if wxUSE_STATLINE
25
26 #include "wx/os2/private.h"
27 #include "wx/log.h"
28
29 // ============================================================================
30 // implementation
31 // ============================================================================
32
33 IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
34
35 // ----------------------------------------------------------------------------
36 // wxStaticLine
37 // ----------------------------------------------------------------------------
38
39 bool wxStaticLine::Create(
40 wxWindow* pParent
41 , wxWindowID vId
42 , const wxPoint& rPos
43 , const wxSize& rSize
44 , long lStyle
45 , const wxString& rsName
46 )
47 {
48 wxSize vSize = AdjustSize(rSize);
49
50 if ( !CreateControl( pParent
51 ,vId
52 ,rPos
53 ,vSize
54 ,lStyle
55 ,wxDefaultValidator
56 ,rsName
57 ))
58 return FALSE;
59 if (!OS2CreateControl( wxT("STATIC")
60 ,SS_FGNDFRAME
61 ,rPos
62 ,rSize
63 ,rsName
64 ))
65 return FALSE;
66
67 wxColour vColour;
68
69 vColour.Set(wxString(wxT("GREY")));
70
71 LONG lColor = (LONG)vColour.GetPixel();
72
73 ::WinSetPresParam( m_hWnd
74 ,PP_FOREGROUNDCOLOR
75 ,sizeof(LONG)
76 ,(PVOID)&lColor
77 );
78 return TRUE;
79 } // end of wxStaticLine::Create
80
81 WXDWORD wxStaticLine::OS2GetStyle(
82 long lStyle
83 , WXDWORD* pdwExstyle
84 ) const
85 {
86 //
87 // We never have border
88 //
89 lStyle &= ~wxBORDER_MASK;
90 lStyle |= wxBORDER_NONE;
91
92 WXDWORD dwStyle = wxControl::OS2GetStyle( lStyle
93 ,pdwExstyle
94 );
95 //
96 // Add our default styles
97 //
98 return dwStyle | WS_CLIPSIBLINGS;
99 }
100 #endif // wxUSE_STATLINE