I want to print a customized report to a specific printer, bypassing the print dialog. The printer is to be selected by the user for each report template.
Right now I have the code to print the report showing the print dialog, or directly to the default printer. I need to change it in order to print directly to a printer which is not necessarily the default one.
I realize that calling SetDefaultPrinter
before printing is an easy solution, but it's not thread-safe.
Note: I'm using C++/MFC.