Thread: Details of LBS_SORT style

  1. #1
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138

    Details of LBS_SORT style

    When using the LBS_SORT style for a list box, where would the box put two identical strings. For example, say the list already contained the following

    abc
    foo
    glue
    moo
    new
    stew
    zoo

    Where would the box put a second glue if I wanted to add it? Would it go after or before the second glue? Just wondering.

  2. #2
    Unregistered
    Guest
    Here's a way to test it yourself:

    Use LB_SETITEMDATA message to associate the index of the first 'glue' that you add. You can then add another 'glue' and then use LB_GETITEMDATA to see where in the list the 'tagged' 'glue' appears.

    But to save you the hassle, I tried it already: the second 'glue' is inserted before the first.

  3. #3
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    ...and that last unregistered was me....
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  2. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  3. Which style of if loops is most common?
    By dwks in forum A Brief History of Cprogramming.com
    Replies: 38
    Last Post: 08-25-2005, 03:18 PM
  4. WS_EX_COMPOSITED style (double buffering) problems
    By JasonD in forum Windows Programming
    Replies: 2
    Last Post: 10-12-2004, 11:21 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM