Export (0) Print
Expand All
Expand Minimize


Retrieves the index of the topmost visible item when in list view or report view.

int GetTopIndex( ) const;

The index of the topmost visible item.

		// Make sure the focus is set to the list view control.

		// Select all of the items that are completely visible. 
		int n = m_myListCtrl.GetTopIndex();
		int nLast = n + m_myListCtrl.GetCountPerPage();

		for (; n < nLast; n++)
			m_myListCtrl.SetItemState(n, LVIS_SELECTED, LVIS_SELECTED);
			ASSERT(m_myListCtrl.GetItemState(n, LVIS_SELECTED) == LVIS_SELECTED); 

Header: afxcmn.h

© 2014 Microsoft