控制ClistCtrl的滚动的位置

int nItem = m_listCtrl.GetTopIndex();
CRect rc;
m_listCtrl.GetItemRect(nItem, rc, LVIR_BOUNDS);
CSize sz(0, (nSel - nItem)*rc.Height());
m_listCtrl.Scroll(sz);
m_listCtrl.SetItemState(nSel, LVIS_SELECTED, LVIS_SELECTED);

原文地址:https://www.cnblogs.com/Travis990/p/4651677.html