Because the month calendar control is created, it will insert the current time into its "today" date and time. Later, when a time is 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 time. The following table shows messages that set a date, and the manner in which those messages affect time fields.
Message |
Description |
MCM_SETCURSEL | The control copies the time fields without validation or modification. |
MCM_SETRANGE | The control validates the time fields of the structures passed in. If valid, the time fields are copied without modification. If 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 valid, the time fields are copied without modification. If invalid, the control retains the time fields from the current selection ranges. |
MCM_SETTODAY | The control copies the time fields 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. The control does not examine or modify the time fields as a result of any operations other than those previously listed.