Click here to Skip to main content
14,208,761 members
Rate this:
Please Sign up or sign in to vote.
See more:
i have the following problem:

I open an mfc printing dialog with DoPreparePrinting(pInfo);
When i then change to a non default printer (switch the printer in the dialog view)
the new printer took several properties of the default - printer. (i can view this by viewing the properties of the printer). E.g. the page format is set to A4 alltough the default page format of this printer is A5.

I have no idea how to tell mfc that is should take for each printer its default properties. (and not the properties of the default printer). Does anyone can help me or point me in the right direction?

Thanks for any help

What I have tried:

I have googled around and found how to change the default printers properties. (With the documentProperties and the setprinter functions). But i do not found how to solve me problem....
Richard MacCutchan 16-Mar-16 6:12am
I think that at the time you call DoPreparePrinting you have already selected the parameters for the printer (page size, orientation etc), so switching printers will retain those values, as it should.
Member 10781325 16-Mar-16 11:21am
Thx for the anwser. Maybe this is true. But if i set up a new mfc project. I see the same behaviour. Why does mfc not take the default printer settings for all of the printers? Or do you know how i can change the settings before calling DoPreparePrinting? Thx for your help!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web02 | 2.8.190612.1 | Last Updated 16 Mar 2016
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100