Processing the DTN_DATETIMECHANGE Notification
A date and time picker (DTP) control sends the DTN_DATETIMECHANGE message whenever a change occurs. This message will be generated if the user changes one of the fields in the control or changes the state of the control's check box (DTS_SHOWNONE only).
The following example is an application-defined function designed to update a static control within a dialog box. The text within the static control is changed to reflect the current state of the DTP control.
void WINAPI DoDateTimeChange(LPNMDATETIMECHANGE lpChange)
{
// If the user has unchecked the DTP's check box, change the
// text in a static control to show the appropriate message.
//
// g_hwndDlg - a program-global address of a dialog box.