The ListView_GetSortColumn() function returns the index of the column by which the list view field is being sorted. It also returns whether items in the column are sorted in ascending or descending order.
ListView_GetSortColumn(list_view_field, sort_order)
• list_view_field – The list view field from which sorting information is being retrieved.
• sort_order – An integer indicating how the column is sorted. The value corresponds to one of the following constants:
Constant |
Description |
---|---|
LV_SORT_ASCENDING |
The column items are sorted in ascending order. |
LV_SORT_DESCENDING |
The column items are sorted in descending order. |
An integer containing the index of the column by which the list view field is being sorted.