I'm using C++ under MSVC 2012 on Windows. I'm using pure Win32 w/ dialogs, no MFC.
I have the LVITEM struct for a given item. I would like to change the index of the item on the given ListView so that I can reorder the positions of the items. The .iItem
property is essentially what I'm trying to change, however, I don't know how to have the change reflect in the list view.
If possible, I'd like the ListView to automatically shift the items below where I move the item, not overwrite the existing item in the new position.
LVM_SETITEMINFO
message or anything like that. (Well, there isLVM_SETITEM
, but that can't change the index because it uses it to identify the item.) The only way I've ever seen it done is removing the item from its current location, and re-inserting it into the new location. Hopefully someone else knows something I don't! – Cody Gray