Export (0) Print
Expand All
Expand Minimize


Ensures that a list view item is at least partially visible.

BOOL EnsureVisible( 
   int nItem, 
   BOOL bPartialOK  


Index of the list view item that is to be visible.


Specifies whether partial visibility is acceptable.

Nonzero if successful; otherwise zero.

The list view control is scrolled if necessary. If the bPartialOK parameter is nonzero, no scrolling occurs if the item is partially visible.

		// Ensure that the last item is visible. 
		int nCount = m_myListCtrl.GetItemCount();
		if (nCount > 0)
			m_myListCtrl.EnsureVisible(nCount-1, FALSE);

Header: afxcmn.h

© 2014 Microsoft