The list-view control has the LVM_GETTOPINDEX
message that allows to get the index of the topmost visible item.
Now I need to set the topmost visible item, but surprisingly there is no LVM_SETTOPINDEX
message which would be natural.
Is there an easy clean way to set the topmost item?
My list-control is always in report mode.
This function does the job:
No parameter sanitation is done here.
Thanks to David Heffernan and Remy Lebeau for giving me the idea.