Scenario:
A Listview with Header DragDrop, the user changes the order of columns. The order of columns should be saved and restored.
Question:
How can I retrieve the position of the column, and how can it be set programatically?
To get the current left-to-right order of columns:
DIM lpiArray(iCount - 1) AS LONG
SendMessage(hwndLV, %LVM_GETCOLUMNORDERARRAY, iCount, VARPTR(lpiArray(0)))
Where iCount is the number of columns and hwndLV the handle of the ListView.
To set the left-to-right order of columns use:
SendMessage(hwndLV, %LVM_SETCOLUMNORDERARRAY, iCount, VARPTR(lpiArray(0)))
Thank you, Jose. I was just checking through your wrappers in ListViewCtrl.inc and found
ListView_GetColumnOrderArray.
Thanks for the quick help.
Thanks again, Jose, works perfect!