CMonthCalendar Class |
Description
The CMonthCalendar class adds support for the month calendar control. The month calendar control provides the user with an intuitive and recognizable method of entering or selecting a date. The control also provides the application with the means to obtain and set the date information in the control using existing data types.
CMonthCalendar Members
Construction | |
CMonthCalendar | CMonthCalendar();Constructs a month calendar control. |
COLORREF GetColor(int nRegion) const;Retrieves the color for a given portion of the month calendar control.
int GetFirstDayOfWeek(BOOL* pbLocal = NULL) const;Retrieves the first day of the week for the month calendar control.
CRect GetMinReqRect() const;Retrieves the minimum size required to display a full month in the month calendar control.
int GetMonthDelta() const;Retrieves the scroll rate for the month calendar control. The scroll rate is the number of months that the control moves its display when the user clicks a scroll button.
COLORREF SetColor(int nRegion, COLORREF ref);Sets the color for a given portion of the month calendar control.
BOOL SetFirstDayOfWeek(int iDay, int* lpnOld = NULL);Sets the first day of the week for the month calendar control.
int SetMonthDelta(int iDelta);Sets the scroll rate for the month calendar control. The scroll rate is the number of months that the control moves its display when the user clicks a scroll button.
BOOL GetCurSel(LPSYSTEMTIME pDateTime) const;Retrieves the currently selected date.
int GetMaxSelCount() const;Retrieves the maximum date range that can be selected in a month calendar control.
int GetMonthRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange, DWORD dwFlags) const;Retrieves date information (using
DWORD GetRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange) const;Retrieves date information that represents the upper and lower limits of the date range currently selected by the user.
BOOL GetToday(LPSYSTEMTIME pDateTime) const;Retrieves the date information for the date specified as "today" for the month calendar control.
DWORD HitTest(PMCHITTESTINFO pMCHitTest);Determines which portion of the month calendar control is at a given point on the screen.
BOOL SetCurSel(const LPSYSTEMTIME pDateTime);Sets the currently selected date for the month calendar control. If the specified date is not in view, the control updates the display to bring it into view.
BOOL SetDayState(int nMonths, LPMONTHDAYSTATE pStates);Sets the day states for all months that are currently visible within the month calendar control.
BOOL SetMaxSelCount(int nMax);Sets the maximum number of days that can be selected in the month calendar control.
BOOL SetRange(const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange);Sets the minimum and maximum allowable dates for the month calendar control.
BOOL SetSelRange(const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange);Sets the selection for a month calendar control to the given date range.
void SetToday(const LPSYSTEMTIME pDateTime);Sets the "today" selection for a month calendar control.
Base class Members
For base class members, refer to the members of CWnd.
Remarks
Summary Information
Header file | controls.h |
Win32/64 support | Yes |
WinCE support | Yes |