This seems like a really common request, and it's baffling to me that no one has come up with an answer that seems to work consistently. I've tried using GetScrollPos/SetScrollPos and GetScrollInfo/SetScrollInfo, but neither of these seem to have any effect on the Listview. (Occasionally these calls do move the scrollbars, but they are out of sync with the ListView's contents, which have reset to the default position.)
In my particular case, all I'm trying to do is restore the horizontal scroll position of a ListView following a sort (which resets the ListView's position). Oddly enough, sorting the ListView causes it to obtain a new window handle, but I'm referencing the new handle post-sort, so it's not a matter of calling SetScrollInfo on the wrong handle.
Can anyone post working code that properly saves and restores the horizontal / vertical scroll positions of a ListView (including both its scrollbars and list items), which is what I believe is what the original poster was asking about?
Thanks.