Scrolling a List Box

I have a small modeless dialog box with a list box control in it. I'm adding text strings to it as the main application processes a few things. I'm looking for a way to scroll the list box to the bottom as strings are added. Its working pretty much like the output pane in VC++, with the exception that I can't get it to automatically scroll down as strings are added. I've tried to use ScrollWindowEx() and SetScrollInfo(), but I can't seem to get them to work. The best I've managed so far is to get the scroll bar to move, but not the actual list box "view"

Does anyone have a code example of ScrollWindowEx(), ( or am I trying to use the wrong thing )

Any Ideas ???

Comments

  • Hope this is what you need... After you insert stuff at the end of the dialog, call this:

    pListBox->SetTopIndex(pListBox->GetCount()-1);


    : I have a small modeless dialog box with a list box control in it. I'm adding text strings to it as the main application processes a few things. I'm looking for a way to scroll the list box to the bottom as strings are added. Its working pretty much like the output pane in VC++, with the exception that I can't get it to automatically scroll down as strings are added. I've tried to use ScrollWindowEx() and SetScrollInfo(), but I can't seem to get them to work. The best I've managed so far is to get the scroll bar to move, but not the actual list box "view"
    :
    : Does anyone have a code example of ScrollWindowEx(), ( or am I trying to use the wrong thing )
    :
    : Any Ideas ???
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories