Backwards Up-Down

This is a discussion on Backwards Up-Down within the Windows Programming forums, part of the Platform Specific Boards category; My Up-Down... is... backwards. I push the down arrow and it goes up and vice versa... CONTROL "", IDC_UD_YEAR, "msctls_updown32", ...

  1. #1
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902

    Question Backwards Up-Down

    My Up-Down... is... backwards. I push the down arrow and it goes up and vice versa...

    CONTROL "", IDC_UD_YEAR, "msctls_updown32", WS_CHILD | WS_VISIBLE | UDS_SETBUDDYINT | UDS_AUTOBUDDY, 160, 165, 10, 12

    SendDlgItemMessage(hwndDlg, IDC_UD_YEAR, UDM_SETRANGE, 0, (LPARAM) MAKELONG((short) 1700, (short) theTime.wYear + 2));

    What is going on...? I have another one that I haven't set the range on it yet, but it does the same thing...
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    That's normal behaviour. Use the UDM_SETRANGE message to alter it, eg.
    Code:
    SendMessage(hUpDown, UDM_SETRANGE, 0, MAKELPARAM(100,0));
    sets the range for the up-down control with handle, hUpDown, to 0-100 with the control behaving as you want it to.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Backwards uint16_t?
    By DavidDobson in forum C Programming
    Replies: 7
    Last Post: 05-11-2009, 10:45 AM
  2. Searching backwards in a string
    By Ducky in forum C++ Programming
    Replies: 11
    Last Post: 03-09-2008, 01:54 AM
  3. Oh noes, backwards she goes!
    By cboard_member in forum C++ Programming
    Replies: 8
    Last Post: 03-11-2006, 09:58 AM
  4. Taking input and Outputting it backwards
    By whtpirate in forum C Programming
    Replies: 9
    Last Post: 06-08-2003, 11:59 AM
  5. how to print a string backwards
    By Unregistered in forum C# Programming
    Replies: 2
    Last Post: 01-27-2002, 01:04 PM

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