Printing and multithreading
Anyone ever try - or have a suggestion - how to pass the printing off as a thread in an MFC application? When I surround an OnFilePrint as a thread, it bombs when the "viewprint.cpp-OnFilePrint" tries to initiate the CPrintingDialog?
Any suggestions how to do it differently or how to resolve the problem?
Thank you in advance
Sharon
Re: Printing and multithreading
Post some code, how does it bomb and where???
Are you trying to Preview??
Re: Printing and multithreading
Actually after more research and investigation I discovered that you cannot gain access to the mainframe through a thread and if printing is in a thread - the MFC code automatically goes through logic that gets to the CView and Mainframe and these things are not in the map table of the thread and so in an ASSERTVALID the program bombs.
Is there any way to use the default MFC printing and allow the actually waiting for the printing to b in a thread? Is there a better approach?
Sharon