I have a CListCtrl (report style) where I clear the list and repopulate it at certain times. I\'d like to maintain the vertical scroll position when doing this. I see ther
I've done that in the past. IIRC, the trick consisted in:
int topIndex= m_List.GetTopIndex();
RenewContents();
m_List.EnsureVisible(m_List.GetItemCount() - 1); // Scroll down to the bottom
m_List.EnsureVisible(topIndex);// scroll back up just enough to show said item on top