mfc-listctrl滚动到指定行

//要先把控件滚动到这个项这一数据行 int nSel = i; int nItem2 = pMe->m_CtrlResultList->GetTopIndex(); CRect rc; pMe->m_CtrlResultList->GetItemRect(nItem2, rc, LVIR_BOUNDS); CSize sz(0, (nSel – nItem2)*rc.Height()); pMe->m_CtrlResultList->Scroll(sz); //要先把控件滚动到这个项这一数据行 over

Read more