Quantcast
Channel: Set ListView scroll position
Viewing all articles
Browse latest Browse all 11

Set ListView scroll position

$
0
0

ListView top item is not working somehow, at least on VS2013. It is always scrolling to the pos-1, rather than pos.

I have to use LVM_SCROLL, and as you know it requires pixels.

To convert from scroll position to pixels, you can get the item size e.g. listView.GetItemRect(0).Width, then multiply by the scroll position. Then sending LVM_SCROLL with the resultant pixel value - and it works.

Cheers.


Viewing all articles
Browse latest Browse all 11

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>