BCGControlBar Pro for MFC
void CBCGPListCtrl::SetSortColumn ( int  iColumn,
BOOL  bAscending = TRUE,
BOOL  bAdd = FALSE 
)

Sets the current sorted column and its sort order.

Call this member function to set the current sorted column and the sort order. The call is delegared to the underlined header control CBCGPHeaderCtrl::SetSortColumn.

Parameters
iColumnThe zero-based index of a list control column to sort.
bAscendingSpecifies the sort order. TRUE - ascending order, FALSE - descending order.
bAddSpecifies whether the specified column should be added to the current list of sort columns.