Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DateTimePicker unable to select and modify a specific field
#5
Thanks for your help, the code is working well.
Can I merge the date and time fields together like in the image below? This is the response I got in ChatGPT, but I couldn't find the WS_CHILDĀ style.

[Image: 9.png]
the SysDateTimePick32 control can display both date and time simultaneously. It provides a convenient way for users to select and view date and time values within the same control.

By default, the SysDateTimePick32 control only displays the date part. However, you can set the control's style during creation to display both date and time. When creating the control, use the WS_CHILD | WS_VISIBLE | DTS_TIMEFORMAT style.

Here is an example code snippet to create a SysDateTimePick32 control that displays both date and time:

HWND dtPicker = CreateWindowEx(0, DATETIMEPICK_CLASS, NULL, WS_CHILD | WS_VISIBLE | DTS_TIMEFORMAT, 0, 0, 0, 0, hwnd, NULL, hInstance, NULL);

By applying this style, the SysDateTimePick32 control will allow users to select and view both date and time values.


Messages In This Thread
RE: DateTimePicker unable to select and modify a specific field - by Davider - 09-25-2023, 02:59 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)