CListCtrl::DeleteItem
TOC
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

CListCtrl::DeleteItem

Deletes an item from a list view control.

BOOL DeleteItem( 
   int nItem  
);

nItem

Specifies the index of the item to be deleted.

Nonzero if successful; otherwise zero.

int nCount = m_myListCtrl.GetItemCount();

// Delete all of the items from the list view control. 
for (int i=0; i < nCount; i++)
{
   m_myListCtrl.DeleteItem(0);
}

Header: afxcmn.h

Show:
© 2016 Microsoft