|
-
May 11th, 1999, 08:20 AM
#1
How to Get the actual point when clicked in a ScrollView ??
Hi,
I am using CScrollView and my intial window is not maximized. So when I scroll down and tries to click in the view area, then funtion OnLButtonDown() returns point relative to the visible window, I mean not the actual point of the full view.
Can you pls tell me the way out.
With best regards,
Kapil
-
May 11th, 1999, 10:36 AM
#2
Re: How to Get the actual point when clicked in a ScrollView ??
Something like this should work. If you have some zooming involved, you'll have to do some scaling too.
OnLButtonDown(UINT nFlags, CPoint point)
{
CPoint scrollPos = GetScrollPosition();
point.y += scrollPos.y;
point.x += scrollPos.x;
...
}
Hope this helps.
Damir
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|