The ListView_ColumnRemove() function removes the specified column from a list view field.


ListView_ColumnRemove(list_view_field, column_index)


list_view_field – The list view field from which a column is being removed.

column_index – An integer specifying the index of the column that is being removed. The value 1 indicates the first column that was added to the list view field. To remove all columns from the list view field, specify the constant LV_ALL.

Dragging a column to a different position in the list view does not affect the column index.

Return value

A boolean indicating whether the column was removed. True indicates the column was removed, while false indicates it was not.


When you remove a column, the column indexes for the remaining columns may change. The column indexes greater than that of the column removed will decrease by one. For example, the list view field in the following illustration has six columns. Column four is removed.


The column whose column index was 5 now has the column index 4. Likewise, the column whose index was 6 now has the column index 5.


Documentation Feedback