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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...