MFC adds year, month, day, hour, minute, second control

1. Add Data Time Picker control in MFC interface
Insert picture description here

2. Add the variables of the start time and the end time to the object function of the interface.
Insert picture description here
3. Associate the variables with the controls
Insert picture description here

4. Set the format of Time Picker as year-month-day hour: minute: second
Insert picture description here
5. Get the time set on the interface:
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_23350817/article/details/111265758