DrawPage Example for C++ 5.0 and later
void CSample_COMDlg::OnButton27()
{
pRasterDoc->ActivePageIndex = 0;
pRasterDoc->EnableShowZones = TRUE;
pRasterDoc->SelectedZonePenStyle = PENSTYLE_SOLID;
pRasterDoc->SelectedZonePenWidth = 3;
pRasterDoc->SelectedZonePenColor = RGB(255, 0, 0);
pRasterDoc->SetSelectedZonePen ();
pRasterDoc->ZonePenStyle = PENSTYLE_SOLID;
pRasterDoc->ZonePenWidth = 3;
pRasterDoc->ZonePenColor = RGB(0, 0, 0);
pRasterDoc->SetZonePen ();
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;
CClientDC * pDc = new CClientDC(this);
pRasterDoc->DrawPersistence = FALSE;
pRasterDoc->SelectZone(NULL, (long)pDc->m_hDC, 0, 0, TRUE);
pRasterDoc->DrawPage (NULL, (long)pDc->m_hDC, 0);
}