|
-
June 22nd, 1999, 03:48 AM
#1
Please Help !!!
I have an tracker and when I scroll down , my tracker is at the same place but the covering object(ellipse or rectangle) moves up.
Pls advice me the way to move tracker also !!!
regards,
Kapil
-
June 22nd, 1999, 04:34 AM
#2
Re: Please Help !!!
If you are manually positioning the tracker, you must call CScrollView::GetScrollPosition() and offset your tracker's CRect by the contents of the CPoint returned. I.e.,
CPoint ptScrollPos ;
CRect rctTracker(0, 0, 100, 50); // Top-left, with no scrolling.
ptScrollPos = GetScrollPosition();
rctTracker.OffsetRect(ptScrollPos); // ALWAYS top-left now.
Does this help?
-
June 22nd, 1999, 05:50 AM
#3
Re: Please Help !!!
Thanx for the suggestion but the problem is bit more complex as its not derived from CRect, the object is derived from CRetcTracker , which takes the parameter in Device coordinates.
I am waiting for your reply.
Regards,
Kapil
-
June 22nd, 1999, 06:06 AM
#4
Re: Please Help !!!
I think it should still work - after all, the CRectTracker still uses a standard CRect for its position and size.
Why do you say 'device co-ordinates'? I cannot find any mention that the position must be in device co-ords, although we have VC++ V4.0 here, so it may say that in later versions. It DOES say 'client' (description of m_rect member), but it is assuming a non-scrolling window, I believe. Have you tried it and it fails?
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
|