Partager via


CListCtrl::DeleteItem

Deletes an item from a list view control.

BOOL DeleteItem( 
   int nItem  
);

Parameters

  • nItem
    Specifies the index of the item to be deleted.

Return Value

Nonzero if successful; otherwise zero.

Example

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);
        }

Requirements

Header: afxcmn.h

See Also

Reference

CListCtrl Class

Hierarchy Chart

CListCtrl::InsertItem

CListCtrl::DeleteAllItems