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
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
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
Just send the LB_PLEASE_SWAP_SORT_ORDER message.
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.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
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.
"Optimal decisions, once made, do not need to be changed." - Robert Sedgewick, Algorithms in C
thank you
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.