Creating the Date and Time Picker Control
How the date and time picker control is created depends on whether you are using the control in a dialog box or creating it in a nondialog window.
To use CDateTimeCtrl directly in a dialog box
In the dialog editor, add a Date and Time Picker Control to your dialog template resource. Specify its control ID.
Specify any styles required, using the Properties dialog box of the date and time picker control.
Use ClassWizard to add a member variable of type with the Control property. You can use this member to call CDateTimeCtrl member functions.
Use ClassWizard to map handler functions in the dialog class for any date time picker control notification messages you need to handle.
In , set any additional styles for the CDateTimeCtrl object.
To use CDateTimeCtrl in a nondialog window