]> git.saurik.com Git - wxWidgets.git/blob - src/msw/timectrl.cpp
Fix current field highlighting in generic wxTimePickerCtrl under wxGTK.
[wxWidgets.git] / src / msw / timectrl.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/msw/timectrl.cpp
3 // Purpose: wxTimePickerCtrl implementation
4 // Author: Vadim Zeitlin
5 // Created: 2005-01-09
6 // RCS-ID: $Id$
7 // Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org>
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // ============================================================================
12 // declarations
13 // ============================================================================
14
15 // ----------------------------------------------------------------------------
16 // headers
17 // ----------------------------------------------------------------------------
18
19 #include "wx/wxprec.h"
20
21 #ifdef __BORLANDC__
22 #pragma hdrstop
23 #endif
24
25 #if wxUSE_DATEPICKCTRL
26
27 #ifndef WX_PRECOMP
28 #endif
29
30 #include "wx/timectrl.h"
31 #include "wx/dateevt.h"
32
33 IMPLEMENT_DYNAMIC_CLASS(wxTimePickerCtrl, wxControl)
34
35 // ============================================================================
36 // wxTimePickerCtrl implementation
37 // ============================================================================
38
39 WXDWORD wxTimePickerCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
40 {
41 WXDWORD styleMSW = wxTimePickerCtrlBase::MSWGetStyle(style, exstyle);
42
43 styleMSW |= DTS_TIMEFORMAT;
44
45 return styleMSW;
46 }
47
48 wxLocaleInfo wxTimePickerCtrl::MSWGetFormat() const
49 {
50 return wxLOCALE_TIME_FMT;
51 }
52
53 bool wxTimePickerCtrl::MSWOnDateTimeChange(const NMDATETIMECHANGE& dtch)
54 {
55 m_date.SetFromMSWSysTime(dtch.st);
56
57 wxDateEvent event(this, m_date, wxEVT_TIME_CHANGED);
58 return HandleWindowEvent(event);
59 }
60 #endif // wxUSE_DATEPICKCTRL