Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

SFTTREE_SORTPROCEX Type Definition

Defines the type of a user-supplied callback routine, called by SftTree/DLL to allow an application to sort items using SortDependents.

typedef int (CALLBACK* SFTTREE_SORTPROCEX)(
        HWND hwnd,
        LPCTSTR lpszString1,
        LPCTSTR lpszString2,
        SFTTREE_DWORD_PTR userData1,
        SFTTREE_DWORD_PTR userData2);

Parameters

hwnd

The window handle of the tree control.

lpszString1

The string component of the first item to sort. This parameter may be NULL if no string component is available (see AddString and InsertString).

lpszString2

The string component of the second item to sort. This parameter may be NULL if no string component is available (see AddString and InsertString).

userData1

The application-specific value (see SetItemData) of the first item to sort.

userData2

The application-specific value (see SetItemData) of the second item to sort.

Returns

The return value is 0 if the two items compare as being equal, 1 if the first item is greater than the second item, -1 if the first item is smaller than the second item.

Comments

SFTTREE_SORTPROCEX defines the type of a user-supplied callback routine, called by SftTree/DLL to allow an application to sort items using SortDependents.

An application can sort items based on their column contents (lpszString1 and lpszString2) or based on item data values (userData1 and userData2). A comparison callback is defined using the SFTTREE_SORTPROCEX type. The callback returns 0 if the items compare as being equal, 1 if the first item is greater than the second item, -1 if the first item is smaller than the second item.

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