Times

Because the month calendar control is created, it will insert the current time into its "today" date and time. When a time is later set programmatically, the control will either copy the time fields as they are or validate them first and then, if invalid, store the current default times. Messages that set a date and the manner in which those messages treat time fields are described in the following table.

Message Description
MCM_SETCURSEL The control copies the time fields as they are, without validation or modification.
MCM_SETRANGE The control validates the time fields of the structures passed in. If they are valid, the time fields are copied without modification. If they are invalid, the control copies the time fields from the "today" date and time.
MCM_SETSELRANGE The control validates the time fields of the structures passed in. If they are valid, the time fields are copied without modification. If they are invalid, the control retains the time fields from the current selection ranges.
MCM_SETTODAY The control copies the time fields as they are, without validation or modification.

When a date is retrieved from the month calendar control, the time fields will be copied from the stored times without modification. Handling of the time fields by the control is provided as a convenience to you. The control does not examine or modify the time fields as a result of any operation other than those previously listed.