Create DateTimePicker in Windows 98
I've created a DateTimePicker with this code:
Code:
void CreateControls(HWND hwnd) {
HWND dtpTest = CreateWindowEx(
0, DATETIMEPICK_CLASS, NULL,
WS_VISIBLE | WS_CHILD | DTS_UPDOWN,
8, 8,
100, 20,
hwnd, NULL,
hInst, NULL
);
}
I've also called InitCommonControlsEx() with the ICC_DATE_CLASSES flag. It works fine in Windows XP, but the control isn't created at all in Windows 98.
Am I overlooking something here?
Thanks,
Chris
RE: Create DateTimePicker in Windows 98
I finally got it working after hours of banging my head against the wall.
Before I was calling InitCommonControlsEx right after registering my window class. I moved it to the WM_CREATE message handler, and it works. I'm not sure why it wouldn't work the other way, so if anyone can fill me in on that it would be great.
Chris