PaintZoomFactor Example for C++ 5.0 and later

void CSample_COMDlg::TestPaintZoomFactor()
{
   pRasterDoc->ActivePageIndex = 0; 
   pRasterDoc->EnableShowZones = TRUE; 

   pRasterDoc->PutScaleMode(SCALEMODE_PIXEL); 

   pRasterDoc->SourceLeft = 0; 
   pRasterDoc->SourceTop = 0; 
   pRasterDoc->SourceWidth = pRasterDoc->PageWidth [0]; 
   pRasterDoc->SourceHeight = pRasterDoc->PageHeight [0]; 

   pRasterDoc->SourceClipLeft = 0; 
   pRasterDoc->SourceClipTop = 0; 
   pRasterDoc->SourceClipWidth = 0; 
   pRasterDoc->SourceClipHeight = 0; 

   pRasterDoc->DestinationLeft = 0; 
   pRasterDoc->DestinationTop = 0; 
   pRasterDoc->DestinationWidth = pRasterDoc->PageWidth [0]; 
   pRasterDoc->DestinationHeight = pRasterDoc->PageHeight [0]; 

   pRasterDoc->DestinationClipLeft = 0; 
   pRasterDoc->DestinationClipTop = 0; 
   pRasterDoc->DestinationClipWidth = 0; 
   pRasterDoc->DestinationClipHeight = 0; 

   float fZoom = pRasterDoc->GetPaintZoomFactor(0); 
   if (fZoom != 100.0) 
      pRasterDoc->PutPaintZoomFactor(0, 100.0); 

   CClientDC * pDc = new CClientDC(this); 

   pRasterDoc->DrawPersistence = FALSE; 
   pRasterDoc->DrawPage (NULL, (long)pDc->m_hDC, 0); 
}