CListBox::SetTopIndex
確保特定清單方塊項目為可見的。
int SetTopIndex(
int nIndex
);
參數
- nIndex
指定清單方塊項目之以零起始的索引。
傳回值
零,如果成功或 LB_ERR ,如果發生錯誤。
備註
系統會移動清單方塊,直到 nIndex 指定的項目會出現在 清單方塊最上方或最大捲動範圍已經到達。
範例
// Set the first visible item in the list box to be the middle item
m_myListBox.SetTopIndex(m_myListBox.GetCount()/2);
需求
Header: afxwin.h