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]