Thread: Backwards Up-Down

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

    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
    Join Date
    Jan 2002
    That's normal behaviour. Use the UDM_SETRANGE message to alter it, eg.
    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, 09:45 AM
  2. Searching backwards in a string
    By Ducky in forum C++ Programming
    Replies: 11
    Last Post: 03-09-2008, 12:54 AM
  3. Oh noes, backwards she goes!
    By cboard_member in forum C++ Programming
    Replies: 8
    Last Post: 03-11-2006, 08:58 AM
  4. Taking input and Outputting it backwards
    By whtpirate in forum C Programming
    Replies: 9
    Last Post: 06-08-2003, 10:59 AM
  5. how to print a string backwards
    By Unregistered in forum C# Programming
    Replies: 2
    Last Post: 01-27-2002, 12:04 PM