1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/datetimectrl.h
3 // Purpose: wxDateTimePickerCtrl for Windows.
4 // Author: Vadim Zeitlin
5 // Created: 2011-09-22 (extracted from wx/msw/datectrl.h).
7 // Copyright: (c) 2005-2011 Vadim Zeitlin <vadim@wxwindows.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_MSW_DATETIMECTRL_H_
12 #define _WX_MSW_DATETIMECTRL_H_
16 // Forward declare a struct from Platform SDK.
17 struct tagNMDATETIMECHANGE
;
19 // ----------------------------------------------------------------------------
20 // wxDateTimePickerCtrl
21 // ----------------------------------------------------------------------------
23 class WXDLLIMPEXP_ADV wxDateTimePickerCtrl
: public wxDateTimePickerCtrlBase
27 virtual void SetValue(const wxDateTime
& dt
);
28 virtual wxDateTime
GetValue() const;
30 // returns true if the platform should explicitly apply a theme border
31 virtual bool CanApplyThemeBorder() const { return false; }
33 virtual bool MSWOnNotify(int idCtrl
, WXLPARAM lParam
, WXLPARAM
*result
);
36 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_NONE
; }
37 virtual wxSize
DoGetBestSize() const;
39 // Helper for the derived classes Create(): creates a native control with
40 // the specified attributes.
41 bool MSWCreateDateTimePicker(wxWindow
*parent
,
47 const wxValidator
& validator
,
48 const wxString
& name
);
50 // Override to return the date/time format used by this control.
51 virtual wxLocaleInfo
MSWGetFormat() const = 0;
53 // Override to indicate whether we can have no date at all.
54 virtual bool MSWAllowsNone() const = 0;
56 // Override to update m_date and send the event when the control contents
57 // changes, return true if the event was handled.
58 virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE
& dtch
) = 0;
61 // the date currently shown by the control, may be invalid
65 #endif // _WX_MSW_DATETIMECTRL_H_