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

        int nColumnCount = m_myListCtrl.GetHeaderCtrl()->GetItemCount();

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

Requirements

Header: afxcmn.h

See Also

Reference

CListCtrl Class

Hierarchy Chart

CListCtrl::InsertColumn

CListCtrl::DeleteAllItems

Other Resources

CListCtrl Members