Help with sorting a ListCtrl
MSDN states that the lParam1 and lParam2 of the callback procedure will be the "item data" (i wont even go into how useless in many cases that param will be when trying to sort insorting), but in their example they assume lParam1 and lParam2 will be the index of the items to be compared.
I need to get the label for each item (plus some other stuff) to be able to compare them. The only way I can see to do this is to dynamically allocate a struct with all the necessary values and use that as the item data. But then I end up having to write my own list deletion routine to make sure everything gets deallocated.
Am I misunderstaning something about the MSDN description? If not, is dynamic allocation the only way there is to acccomplish what im trying to do?