Thread: LB_ADDSTRING sorting instead of adding

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    932

    LB_ADDSTRING sorting instead of adding

    Hello,

    LB_ADDSTRING is sorting out the string im sending instead of adding it at the end of the list.
    I dont have LBS_SORT style.

    Code:
                
    CreateWindowEx(WS_EX_CLIENTEDGE,"ListBox", 0,
                               WS_CHILD|WS_VISIBLE|LBS_STANDARD|WS_HSCROLL|
                               WS_SIZEBOX|LBS_DISABLENOSCROLL|LBS_HASSTRINGS,
                               20, 200, 380, 300, hWnd,
                               (HMENU)IDB_LISTBOX, 0, NULL);
    What can be the cause?
    Using Windows 10 with Code Blocks and MingW.

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Take out all the LBS_ styles... what do you get?

    I believe LBS_STANDARD includes the LBS_SORT...

    List Box Styles

    LB_ADDSTRING message

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    932
    Awesome, thanks mate.
    I should have search this page for LBS_SORT then i would have found it.
    Next time ill know how to search. Cheers.
    Using Windows 10 with Code Blocks and MingW.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Adding nodes to an array at the top & array sorting
    By Wolf` in forum C++ Programming
    Replies: 1
    Last Post: 06-25-2010, 12:48 PM
  2. Java: Sorting and Adding a Row in Table
    By alphaoide in forum Tech Board
    Replies: 4
    Last Post: 08-12-2005, 08:22 PM
  3. adding a VB gui
    By DMaxJ in forum C++ Programming
    Replies: 2
    Last Post: 02-10-2003, 09:35 AM
  4. Sorting words with a fast, effincient sorting method
    By Unregistered in forum C++ Programming
    Replies: 19
    Last Post: 07-12-2002, 04:21 PM
  5. Error with LB_ADDSTRING..
    By BubbleMan in forum Windows Programming
    Replies: 3
    Last Post: 09-19-2001, 12:36 AM