Jump to content
Software FX Community

PrintPreview problem - Page Number

User (Legacy)

Recommended Posts

Dear Concerned.

I'm trying to implement Print Preview.

In SoftwareFX KB, I found the article as following.


if (pInfo->m_bPreview) { CDC *sdc; sdc = GetDC(); //

Screen DC int xScrRes = sdc->GetDeviceCaps(LOGPIXELSX); // Screen

resolution (X) int yScrRes = sdc->GetDeviceCaps(LOGPIXELSY); //

Screen resolution (Y) int xPrnRes = pDC->GetDeviceCaps(LOGPIXELSX);

// Printer resolution (X) int yPrnRes =

pDC->GetDeviceCaps(LOGPIXELSY); // Printer resolution (Y) int

nPrnWidth = pDC->GetDeviceCaps(HORZRES); // Page size (X) int

nPrnHeight = pDC->GetDeviceCaps(VERTRES); // Page size (Y)

ReleaseDC(sdc); pDC->SaveDC(); // Save settings

// Maps to equivalent SCREN resolution



s,yPrnRes)); pDC->SetViewportExt(nPrnWidth,nPrnHeight);


nRes), MulDiv(pInfo->m_rectDraw.top,yScrRes,yPrnRes),



(CfxChartPaint) 0,0); pDC->RestoreDC(-1); // Restore settings} else

m_pChartFX->Paint((long)pDC->m_hDC, pInfo->m_rectDraw.left,

pInfo->m_rectDraw.top, pInfo->m_rectDraw.right,


CPAINT_PRINT,0);------------------------------------------------But Paint

method can print only one page.My Chart has lots of points. Is there any way

to use "Paint method" with scrolling Chart?And Is there any way to know the

number of pages without using "PrintIt method"Please, Help me...Good Luck...

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...