Click to See Complete Forum and Search --> : Using MFC-Class CRectTracker with CScrollView


April 15th, 1999, 10:50 AM
Hi there

I'm trying to draw rects around objects using CRectTracker::Draw(CDC* pDC).
But CDC uses the Client Coordinates of the window.

Now I'd like to know, how I can tell the function to use logical coordinates instead of client coordinates.

I hope somebody can help me

June 28th, 1999, 07:38 AM
You can set a CRect value ( such as rect ), and make the 'rect' to keep the logical coordinates, every time you want recttracker, you can create a CRectTracker from 'rect', then you'll do it!

Fabi Pantera
June 28th, 1999, 07:48 AM
There are some functions which converts from LP to DP (I think LPtoDP and DPToLP on CWnd or CView). You also need to redraw to the old rect before draw the newly. Let me know if it helps you.
Regards,
Faby