Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

SFTTREE_SORTPROC_CELLDATA 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_SORTPROC_CELLDATA)(
        HWND hwnd,
        LPCTSTR lpszString1,
        LPCTSTR lpszString2,
        SFTTREE_DWORD_PTR userData1,
        SFTTREE_DWORD_PTR userData2,
        SFTTREE_DWORD_PTR cellData1,
        SFTTREE_DWORD_PTR cellData2);

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.

cellData1

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

cellData2

The application-specific value (see SetCellInfo) 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_SORTPROC_CELLDATA 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), based on item data values (userData1 and userData2) or cell data values (cellData1 and cellData2). A comparison callback is defined using the SFTTREE_SORTPROC_CELLDATA 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