|
-
August 31st, 2004, 04:48 AM
#1
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
-
August 31st, 2004, 08:29 AM
#2
Re: Printing and multithreading
Post some code, how does it bomb and where???
Are you trying to Preview??
-
September 5th, 2004, 06:56 AM
#3
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
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
|