|
-
September 15th, 2001, 11:17 PM
#1
Changing the number of copies per page on the fly
I want to print as many copies of page 1 of my document as the user specifies. I then want to print ONE copy of page 2.
So I do the following:
void CMyView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
{
if (pDC->IsPrinting() && (pInfo->m_nCurPage==2))
{
LPDEVMODE pDevMode = pInfo->m_pPD->GetDevMode();
pDevMode->dmCopies = 1;
// Make sure that all objects other than the stock objects
// that had been selected into the device context have been
// selected out.
pDC->ResetDC(pDevMode);
}
// Call the base class OnPrepareDC.
CView::OnPrepareDC(pDC,pInfo);
}
Unfortunely, page 2 is printed as many time as page 1. Now get this; if I change the code so that I change the number of page 1 copies to one, then page 2 gets changed to one copy.
Any other changes I make to the DEVMODE work perfectly. I can change orientation, paper size; anything but the number of copies!!
Help !!
Geno Carman
[email protected]
-
September 16th, 2001, 01:31 AM
#2
Re: Changing the number of copies per page on the fly
Copy number is implemented as a document level setting. It affects the whole document. Send page 1 multiple times.
http://www.fengyuan.com (Author of Windows Graphics Programming: Win32 GDI and DirectDraw)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|