Usually one need to catch
LVN_COLUMNCLICK[
^] and process the sorting stuff with
ListView_SortItems[
^] or
ListView_SortItemsEx[
^].
There're so many samples out
there[
^].
Please pay an extra attention with this note:
"During the sorting process, the list-view contents are unstable. If the callback function sends any messages to the list-view control aside from LVM_GETITEM (ListView_GetItem), the results are unpredictable."