CompuServe Thread

Printing to Metafile

1 messages in this thread
#30666From: Chotkowski, WilliamJul 12, 1994 10:04 AM
Printing to Metafile — declared parent_msg_num=(none), resolved parent_id points to #(none)
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?