Scroll amount
-
Hi, I really really desperately need to learn how to get the amount the listview control has scrolled of. Like 10 pixels up or 40 pixels down... I cannot find it anywhere... Thanks
Just a guess :)
UINT nScrollPos = GetScrollPos(SB_VERT)
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr -
Just a guess :)
UINT nScrollPos = GetScrollPos(SB_VERT)
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohryeah, but that gives me the position instead of the amount of pixel scrolled. Even if I keep the last position and calculate it then, then how will I get the result if it it the first time I request the position and have no previous one... Okay, ,aybe I can assume it was 0... and can I assume it is position = scroll amount in pixels? Thanks
-
yeah, but that gives me the position instead of the amount of pixel scrolled. Even if I keep the last position and calculate it then, then how will I get the result if it it the first time I request the position and have no previous one... Okay, ,aybe I can assume it was 0... and can I assume it is position = scroll amount in pixels? Thanks
If
GetScrollBar
() is retuning the index of the top most item in the list...multiply this number by the height of each individual item. This value I think can be retreived viaCListCtrl::GetItemRect()
That calculation will return scroll position in pixels...i think... HTH cheers "An expert is someone who has made all the mistakes in his or her field" - Niels Bohr