Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

SortIndicator

Defines the sort information for the specified columns.

C

BOOL WINAPI SftTree_GetSortIndicator(HWND hwndCtl, int realCol, int* sortStyle);
BOOL WINAPI SftTree_SetSortIndicator(HWND hwndCtl, int realCol, int sortStyle);
BOOL WINAPI SftTreeSplit_GetSortIndicator(HWND hwndCtl, int realCol, int* sortStyle);
BOOL WINAPI SftTreeSplit_SetSortIndicator(HWND hwndCtl, int realCol, int sortStyle);

C++

void CSftTree::GetSortIndicator(int realCol, int* sortStyle) const;
void CSftTree::SetSortIndicator(int realCol, int sortStyle);
void CSftTreeSplit::GetSortIndicator(int realCol, int* sortStyle) const;
void CSftTreeSplit::SetSortIndicator(int realCol, int sortStyle);

Parameters

hwndCtl

The window handle of the tree control.

realCol

The real column number for which the sort style is returned.

sortStyle

A pointer to a field where the sort style of the specified column realCol is returned (GetSortIndicator) or the new sort style to be defined for the specified column (SetSortIndicator).

ValueDescription
SFTTREE_SORT_NONEThere is no sort indicator for the specified column realCol.
SFTTREE_SORT_ASCThe sort indicator is shown as "ascending sort".
SFTTREE_SORT_DESCThe sort indicator is shown as "descending sort".

Returns

The return value is TRUE if the function was successful, otherwise FALSE is returned.

Comments

The SortIndicator function defines the sort information for the specified column realCol.

Only one column can be sorted ascending or descending at a time using the built-in sort handling using EnableSortIndicators with fAuto set to TRUE. If the application explicitly defines sort indicators using the SortIndicator function, multiple columns can have sort indicators. The ResetSortIndicator function can be used to clear all columns' sort indicators.

The EnableSortIndicators function is used to enable sort indicators in column headers.

See Also C/C++ API | Categories | Notifications