LB_ADDSTRING sorting instead of adding

This is a discussion on LB_ADDSTRING sorting instead of adding within the Windows Programming forums, part of the Platform Specific Boards category; Hello, LB_ADDSTRING is sorting out the string im sending instead of adding it at the end of the list. I ...

  1. #1
    Registered User
    Join Date
    Dec 2007
    Location
    France
    Posts
    749

    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?
    Compiler MSVC++ 2010 with Code::Blocks.

  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
    Location
    France
    Posts
    749
    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.
    Compiler MSVC++ 2010 with Code::Blocks.

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, 08: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

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