Export (0) Print
Expand All
Expand Minimize

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:
© 2014 Microsoft