CompuServe Messages

Printing to Metafile

    12-Jul-94 10:04:13
Sb: Printing to Metafile
Fm: Chotkowski, William 73710,203
To: all
While I want to take full advantage of the print preview features the view has to offer, I have to override the actual printing to go to a metafile. I've overridden OnPreparePrinting(…) such that the actual printing does not call DoPreparePrinting(…) since I don't want the print dialog to come up, nor do I want the default DC. Instead I set the m_pPD->m_pd.hDC to be the m_hDC of my CMetaFileDC. This seems valid, but eventually I do get an assertion error in the CView's OnFilePrint procedure (specifically on the .Attach). Is this the correct way to do this, or should I be overriding CView's OnFilePrint procedure instead? Any suggestions?