金山大景城房子怎么样:VC++问题

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/07 07:02:52
请看下列代码:
CListCtrl m_CtrlList;
int nSelectIndex
if(nSelectIndex==m_CtrlList.GetItemCount())
nSelectIndex--;
m_CtrlList.EnsureVisible(nSelectIndex,nSelectIndex+5);
m_CtrlList.SetItemState(nSelectIndex, LVIS_SELECTED, LVIS_SELECTED);
请解释一下EnsureVisible()的第二个参数的作用

使列表项目可见,如果列表项目很多.需要滚动才能看到,即EnsureVisible(确保看得到)