Aracılığıyla paylaş


CListBox::GetTopIndex

Liste kutusunda görünen ilk öğenin sıfır tabanlı dizin alır.

int GetTopIndex( ) const;

Dönüş Değeri

Başarılı olursa, liste kutusundaki ilk görülebilen öğeyi sıfır tabanlı dizini lb_err Aksi durumda.

Notlar

Başlangıçta, liste kutusunun üstündeki öğe 0 değil ancak liste kutusu kaydırırsanız, başka bir öğe üstünde olabilir.

Örnek

// Want an item in the bottom half to be the first visible item.
int n = m_myListBox.GetCount()/2;
if (m_myListBox.GetTopIndex() < n)
{
   m_myListBox.SetTopIndex(n);
   ASSERT(m_myListBox.GetTopIndex() == n);
}

Gereksinimler

Başlık: afxwin.h

Ayrıca bkz.

Başvuru

CListBox sınıfı

Hiyerarşi grafik

CListBox::SetTopIndex

LB_GETTOPINDEX