Jeet
April 24th, 1999, 08:26 AM
Hello all!
For some reason, after a call to SetViewpointOrg I get strange artifacts in the client window after scrolling.
Basically, the setup is as follows:
In CMyAppView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo):
[ccode]
CScrollView::OnPrepareDC(pDC, pInfo);
pDC->SetMapMode( MM_ANISOTROPIC );
pDC->SetWindowExt( 200, -200 );
pDC->SetViewportExt( 1000, 1000 );
pDC->SetViewportOrg( 500, 500 );
[/ccdode]
The idea is to set up a Cartesian coordinate system to plot graphs. If I comment out the SetViewportOrg line above, I have no problems (except the origin is fixed in its location in the upper left-hand corner, whereas I want some flexibility for this). However, after a call to SetViewportOrg, no matter what arguments I send it -- (0,0), (100,100), (0,100), etc. -- I always have artifacts left on the window if I scroll about.
What am I doing wrong? I hope that some better minds out there can pull me out of this morass!
For some reason, after a call to SetViewpointOrg I get strange artifacts in the client window after scrolling.
Basically, the setup is as follows:
In CMyAppView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo):
[ccode]
CScrollView::OnPrepareDC(pDC, pInfo);
pDC->SetMapMode( MM_ANISOTROPIC );
pDC->SetWindowExt( 200, -200 );
pDC->SetViewportExt( 1000, 1000 );
pDC->SetViewportOrg( 500, 500 );
[/ccdode]
The idea is to set up a Cartesian coordinate system to plot graphs. If I comment out the SetViewportOrg line above, I have no problems (except the origin is fixed in its location in the upper left-hand corner, whereas I want some flexibility for this). However, after a call to SetViewportOrg, no matter what arguments I send it -- (0,0), (100,100), (0,100), etc. -- I always have artifacts left on the window if I scroll about.
What am I doing wrong? I hope that some better minds out there can pull me out of this morass!