CListCtrl::DeleteItem
TOC
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

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

// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;

int nCount = pmyListCtrl->GetItemCount();

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

See Also

CListCtrl Overview | Class Members | Hierarchy Chart | CListCtrl::InsertItem | CListCtrl::DeleteAllItems

Show:
© 2016 Microsoft