Scrolling a list box 
Author Message
 Scrolling a list box

I am trying to scroll the contents of a list box downwards when it fills up.
In on the OnDraw() function of my CFormView class I put the following:

if(m_outList.GetCount() > 16)
{
    m_outList.ScrollWindow(0, 15);
    m_outList.UpdateWindow();

Quote:
}

where m_outList is my CListBox handle and 16 is the number of slots
available.

Anyone got any ideas?



Tue, 19 Aug 2003 09:32:59 GMT  
 Scrolling a list box

Quote:
>I am trying to scroll the contents of a list box downwards when it fills up.

To scroll a list box, use the LB_SETTOPINDEX message
(CListBox::SetTopIndex).

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Tue, 19 Aug 2003 21:43:43 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. help:Scrolling an list box

2. Horizontal Scrolling in list box MFC 1.52

3. Scrolling event of list box and list view control

4. List Box scrolling

5. Setting position of scroll box in List Control

6. list box won't scroll horizontally

7. Q: List Box Scrolling

8. How to scroll horizontally ,owner draw list box?

9. Scroll boxes in list view control

10. List box doesnot scroll

11. Scrolling in a list box

12. Title text which will scroll horizontaly with list box

 

 
Powered by phpBB® Forum Software