Create DateTimePicker in Windows 98

This is a discussion on Create DateTimePicker in Windows 98 within the Windows Programming forums, part of the Platform Specific Boards category; I've created a DateTimePicker with this code: Code: void CreateControls(HWND hwnd) { HWND dtpTest = CreateWindowEx( 0, DATETIMEPICK_CLASS, NULL, WS_VISIBLE ...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    9

    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

  2. #2
    Registered User
    Join Date
    Feb 2003
    Posts
    9

    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 07:14 AM
  2. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 06:05 PM
  3. Visual Studio Net on Windows 98
    By bvn in forum Tech Board
    Replies: 2
    Last Post: 12-02-2002, 09:47 AM
  4. Windows 98 Registery... ?
    By jawwadalam in forum Tech Board
    Replies: 12
    Last Post: 10-16-2002, 02:37 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21