1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/datectrl.h
3 // Purpose: wxDatePickerCtrl for Windows
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MSW_DATECTRL_H_
13 #define _WX_MSW_DATECTRL_H_
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 class WXDLLIMPEXP_ADV wxDatePickerCtrl
: public wxDatePickerCtrlBase
23 wxDatePickerCtrl() { }
25 wxDatePickerCtrl(wxWindow
*parent
,
27 const wxDateTime
& dt
= wxDefaultDateTime
,
28 const wxPoint
& pos
= wxDefaultPosition
,
29 const wxSize
& size
= wxDefaultSize
,
30 long style
= wxDP_DEFAULT
| wxDP_SHOWCENTURY
,
31 const wxValidator
& validator
= wxDefaultValidator
,
32 const wxString
& name
= wxDatePickerCtrlNameStr
)
34 Create(parent
, id
, dt
, pos
, size
, style
, validator
, name
);
37 bool Create(wxWindow
*parent
,
39 const wxDateTime
& dt
= wxDefaultDateTime
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
,
42 long style
= wxDP_DEFAULT
| wxDP_SHOWCENTURY
,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxDatePickerCtrlNameStr
);
47 virtual void SetValue(const wxDateTime
& dt
);
48 virtual wxDateTime
GetValue() const;
50 // set/get the allowed valid range for the dates, if either/both of them
51 // are invalid, there is no corresponding limit and if neither is set
52 // GetRange() returns false
53 virtual void SetRange(const wxDateTime
& dt1
, const wxDateTime
& dt2
);
54 virtual bool GetRange(wxDateTime
*dt1
, wxDateTime
*dt2
) const;
57 virtual WXDWORD
MSWGetStyle(long style
, WXDWORD
*exstyle
) const;
59 virtual bool MSWOnNotify(int idCtrl
, WXLPARAM lParam
, WXLPARAM
*result
);
61 virtual wxSize
DoGetBestSize() const;
64 DECLARE_NO_COPY_CLASS(wxDatePickerCtrl
)
67 #endif // _WX_MSW_DATECTRL_H_