Month Calendar Controls

A month calendar control is a child window that displays a monthly calendar. The calendar can display one or more months at a time.

    

Month calendar control

When a user taps the name of a month with the stylus, a pop-up menu appears that lists all the months of the year. A user can select a month by tapping its name on the menu. A user who is using the date picker control can use ALT+DOWN ARROW to activate the month calendar control. The user can scroll the displayed months forward or backward either by tapping the left arrow or right arrow at the top of the control or by pressing the PAGE UP or PAGE DOWN keys on the keyboard. When a user taps the year displayed at the top of the calendar next to the month, an up-down control appears. The user can use this control to change the year. The user can also use CTRL+PAGE UP or CTRL+PAGE DOWN to scroll from one year to another. A user can press keys on the keyboard to navigate; the arrow keys scroll between days, the HOME key moves to the beginning of a month, and the END key moves to the end of a month. Unless the calendar has the MCS_NOTODAY style, the user can return to the current day by tapping the Today label at the bottom of the month calendar control.

You create a month calendar control by specifying MONTHCAL_CLASS in the lpClassName parameter to the CreateWindowEx function. This class is registered when the common control DLL is loaded. You can use the InitCommonControls function to ensure that this DLL is loaded.

To register the month calendar control class using the InitCommonControlsEx function, specify the ICC_DATE_CLASSES flag as the dwICC member of the INITCOMMONCONTROLSEX structure you pass in the lpInitCtrls parameter.