1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/calctrl.h
3 // Purpose: wxCalendarCtrl control implementation for MSW
4 // Author: Vadim Zeitlin
6 // Copyright: (C) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_MSW_CALCTRL_H_
11 #define _WX_MSW_CALCTRL_H_
13 class WXDLLIMPEXP_ADV wxCalendarCtrl
: public wxCalendarCtrlBase
17 wxCalendarCtrl(wxWindow
*parent
,
19 const wxDateTime
& date
= wxDefaultDateTime
,
20 const wxPoint
& pos
= wxDefaultPosition
,
21 const wxSize
& size
= wxDefaultSize
,
22 long style
= wxCAL_SHOW_HOLIDAYS
,
23 const wxString
& name
= wxCalendarNameStr
)
25 Create(parent
, id
, date
, pos
, size
, style
, name
);
28 bool Create(wxWindow
*parent
,
30 const wxDateTime
& date
= wxDefaultDateTime
,
31 const wxPoint
& pos
= wxDefaultPosition
,
32 const wxSize
& size
= wxDefaultSize
,
33 long style
= wxCAL_SHOW_HOLIDAYS
,
34 const wxString
& name
= wxCalendarNameStr
);
36 virtual bool SetDate(const wxDateTime
& date
);
37 virtual wxDateTime
GetDate() const;
39 virtual bool SetDateRange(const wxDateTime
& lowerdate
= wxDefaultDateTime
,
40 const wxDateTime
& upperdate
= wxDefaultDateTime
);
41 virtual bool GetDateRange(wxDateTime
*lowerdate
, wxDateTime
*upperdate
) const;
43 virtual bool EnableMonthChange(bool enable
= true);
45 virtual void Mark(size_t day
, bool mark
);
47 virtual wxCalendarHitTestResult
HitTest(const wxPoint
& pos
,
48 wxDateTime
*date
= NULL
,
49 wxDateTime::WeekDay
*wd
= NULL
);
52 virtual wxSize
wxCalendarCtrl::DoGetBestSize() const;
54 virtual WXDWORD
MSWGetStyle(long style
, WXDWORD
*exstyle
) const;
56 virtual bool MSWOnNotify(int idCtrl
, WXLPARAM lParam
, WXLPARAM
*result
);
61 DECLARE_DYNAMIC_CLASS(wxCalendarCtrl
)
62 DECLARE_NO_COPY_CLASS(wxCalendarCtrl
)
65 #endif // _WX_MSW_CALCTRL_H_