CMonthCalendar

Win32++

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.
  Attributes GetColor
COLORREF GetColor(int nRegion) const;
Retrieves the color for a given portion of the month calendar control. GetFirstDayOfWeek
int GetFirstDayOfWeek(BOOL* pbLocal = NULL) const;
Retrieves the first day of the week for the month calendar control. GetMinReqRect
CRect GetMinReqRect() const;
Retrieves the minimum size required to display a full month in the month calendar control. GetMonthDelta
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. SetColor
COLORREF SetColor(int nRegion, COLORREF ref);
Sets the color for a given portion of the month calendar control. SetFirstDayOfWeek
BOOL SetFirstDayOfWeek(int iDay, int* lpnOld = NULL);
Sets the first day of the week for the month calendar control. SetMonthDelta
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.   Operations GetCurSel
BOOL GetCurSel(LPSYSTEMTIME pDateTime) const;
Retrieves the currently selected date. GetMaxSelCount
int GetMaxSelCount() const;
Retrieves the maximum date range that can be selected in a month calendar control. GetMonthRange
int GetMonthRange(LPSYSTEMTIME pMinRange, LPSYSTEMTIME pMaxRange, DWORD dwFlags) const;
Retrieves date information (using SYSTEMTIME structures) that represents the high and low limits of the month calendar control's display. GetSelRange
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. GetToday
BOOL GetToday(LPSYSTEMTIME pDateTime) const;
Retrieves the date information for the date specified as "today" for the month calendar control. HitTest
DWORD HitTest(PMCHITTESTINFO pMCHitTest);
Determines which portion of the month calendar control is at a given point on the screen. SetCurSel
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. SetDayState
BOOL SetDayState(int nMonths, LPMONTHDAYSTATE pStates);
Sets the day states for all months that are currently visible within the month calendar control. SetMaxSelCount
BOOL SetMaxSelCount(int nMax);
Sets the maximum number of days that can be selected in the month calendar control. SetRange
BOOL SetRange(const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange);
Sets the minimum and maximum allowable dates for the month calendar control. SetSelRange
BOOL SetSelRange(const LPSYSTEMTIME pMinRange, const LPSYSTEMTIME pMaxRange);
Sets the selection for a month calendar control to the given date range. SetToday
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