CListCtrl: Automatic Scroll- Down
-
I'm making a data logger using a CListCtrl. my problem is when a new row of data is inserted at the bottom of the list, the scroll does not scroll-down and the list display remain at the top. what I want to happen is to make the vertical scroll, to scroll-downwards automatically so that the latest data received can be easily seen during actual logging of data. Hope you can help me with my problem!:^) -- modified at 6:28 Friday 13th January, 2006
-
I'm making a data logger using a CListCtrl. my problem is when a new row of data is inserted at the bottom of the list, the scroll does not scroll-down and the list display remain at the top. what I want to happen is to make the vertical scroll, to scroll-downwards automatically so that the latest data received can be easily seen during actual logging of data. Hope you can help me with my problem!:^) -- modified at 6:28 Friday 13th January, 2006
When you add a new item to the CListCtrl, use the
EnsureVisible()
function to make sure that the new item is visible.romuzu wrote:
Hope you can help me with my problem!
Let me know if this helped. Regards, Rajesh R. Subramanian You have an apple and me too. We exchange those and We have an apple each. You have an idea and me too. We exchange those and We have two ideas each.
-
I'm making a data logger using a CListCtrl. my problem is when a new row of data is inserted at the bottom of the list, the scroll does not scroll-down and the list display remain at the top. what I want to happen is to make the vertical scroll, to scroll-downwards automatically so that the latest data received can be easily seen during actual logging of data. Hope you can help me with my problem!:^) -- modified at 6:28 Friday 13th January, 2006
-
I think you could send it a scroll-down message like:
m_List.SendMessage(WM_VSCROLL,MAKEWPARAM(SB_BOTTOM,0),0);
this is this.MSDN says when EnsureVisible is used, the item is shown at any cost, atleast partially. If needed, it is scrolled automatically too. Regards, Rajesh R. Subramanian You have an apple and me too. We exchange those and We have an apple each. You have an idea and me too. We exchange those and We have two ideas each.