Hola Angel.Matilla.
Fijate si te sirve del modo que uso en este ejemplo:
Código:
...
int order;
int __stdcall CustomSortFn(long Item1, long Item2, long ParamSort)
{
return CompareText(((TListItem *)Item1)->Caption,
((TListItem *)Item2)->Caption) * order;
}
void __fastcall TForm1::ListView1ColumnClick(TObject *Sender,
TListColumn *Column)
{
order = (order == 1 ? -1 : 1) ;
ListView1->CustomSort(CustomSortFn, 0);
}
Saludos