After I created a listview control, and placed all I need in side, how can I reverse the order of the content?
Is there a special message I could send to it?
Thanks
Printable View
After I created a listview control, and placed all I need in side, how can I reverse the order of the content?
Is there a special message I could send to it?
Thanks
Just send the LB_PLEASE_SWAP_SORT_ORDER message. :D
Honestly though, you have to either sort your strings manually, send LB_RESETCONTENT to clear the box, and then send the strings again in the order you want, which - BTW - is a straightforward matter, OR you can reset the content, resend the strings unsorted, and then mess with the WM_COMPAREITEM message, which == big headache.
Choose your weapon.
You could use a combination of ListView_GetItem() and ListView_SetItem(). The iItem member of the LVITEM structure refers to the index of the item within the list view.
With this in mind, you'd iterate through all items, obtain each item's LVITEM structure, manipulate the index, and upload the modified structure to the list view.
thank you