Thread: listbox styles

  1. #1
    ll
    Guest

    listbox styles

    i am using the ws_vscroll style on a listbox. is there another style i can add to make the scroll tab stay at the bottom of the shaft instead of the top as more items are added to the listbox.
    thanks

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    I don't understand what you mean. If you use the ws_vscroll you will get a scroll bar on the right side of the listbox. What do you want to place at the bottom?
    // Gliptic

  3. #3
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    To make the listview scroll as you add new items.

    Code:
    	
    SendMessage(hListView, LVM_SCROLL, (WPARAM)0, (LPARAM)(ItemRect.bottom-ItemRect.top));
    SendMessage(hListView, LVM_ENSUREVISIBLE, (WPARAM)iRow, (LPARAM)FALSE);
    I use both as I have a wner draw listview. Try the ENSUREVISIBLE first and add the first line later if needed.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    Okay, now I understand what you ment.
    // Gliptic

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Deal or No Deal listbox prob
    By kryptkat in forum Windows Programming
    Replies: 5
    Last Post: 03-30-2009, 06:53 PM
  2. ListBox Extra Data Storage
    By Welder in forum Windows Programming
    Replies: 1
    Last Post: 11-01-2007, 01:46 PM
  3. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  4. How to cast a ListBox item to an int for a switch statment?
    By Swaine777 in forum C++ Programming
    Replies: 8
    Last Post: 09-26-2004, 08:52 PM
  5. Getting FULL filename from listbox
    By Garfield in forum Windows Programming
    Replies: 8
    Last Post: 01-27-2002, 08:28 AM