This documentation is archived and is not being maintained.

CListCtrl::DeleteColumn

Deletes a column from the list view control.

BOOL DeleteColumn(
   int nCol 
);

Parameters

nCol
Index of the column to be deleted.

Return Value

Nonzero if successful; otherwise zero.

Example

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

int nColumnCount = pmyListCtrl->GetHeaderCtrl()->GetItemCount();

// Delete all of the columns.
for (int i=0;i < nColumnCount;i++)
{
   pmyListCtrl->DeleteColumn(0);
}

See Also

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

Show: