Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
intGetTopIndex()const;
Return Value
The zero-based index of the first visible item in a list box if successful, LB_ERR otherwise.
Remarks
Retrieves the zero-based index of the first visible item in a list box. Initially, item 0 is at the top of the list box, but if the list box is scrolled, another item may be at the top.
Example
// The pointer to my list box.
extern CListBox* pmyListBox;
// Want an item in the bottom half to be the first visible item.
int n = pmyListBox->GetCount()/2;
if (pmyListBox->GetTopIndex() < n)
{
pmyListBox->SetTopIndex(n);
ASSERT(pmyListBox->GetTopIndex() == n);
}
CListBox Overview | Class Members | Hierarchy Chart
See Also CListBox::SetTopIndex,