LVSort CallBack

Syntax

SENDMESSAGE(Dialog1,LVM_SORTITEMS,&LVSORT,CallBack,LISTVIEW)

Description

This is the Callbackfunction that works with ccInsertItem()

Parameters

The Type definition for '_LVSORT' is
TYPE _LVSORT
DEF Win:Window
DEF LV:Uint
DEF Column:Uint
DEF SortingOrder:Int
DEF pszText:Pointer
DEF iItem:Uint
DEF lParam:Uint
ENDTYPE

LVSORT - _LVSORT structure.

Win - Dialog or Window variable the 'Listview' is accommodated in.
LV - The 'Listview' identifier.
Column - The column -usually clicked- to be sorted.
SortingOrder (boolean)-
True = Ascending
False = Descending
pszText - The Item have to be inserted (Not relevant see 'ccInsertItem()')
iItem - The Position of the Item in the ListView (Not relevant see 'ccInsertItem()')
lParam - The unique identifier for the Item (Not relevant see 'ccInsertItem()')

CallBack - Pointer to the Sorting CallBack function. (Retrieved by ccInsertItem())

Return value

None

Remarks

The function have to be prepared by ccInsertItem(), which set the 'LVITEM.lParam' for each Item and retrievs the pointer to the Callback function.

Example usage

See by 'Syntax' above.

See ListViewSortCallback_DEMO.eba
See ccInsertItem()