|T O P I C R E V I E W
||Posted - 22 Feb 2005 : 18:23:00
I am using Visual Studio 6 with the CTWX.OCX charting control. Is there any way to configure PrinterSetup or related methods to command a default of landscape orientation? Perhaps as a method of the CPrintInfo object, using its pointer in OnPreparePrinting()?
I currently use the following series of calls in my Print Setup command handler:
This works fine, but by default the printer properties dialog has portrait orientation selected, and users of my application will always prefer landscape orientation.
|1 L A T E S T R E P L I E S (Newest First)
||Posted - 23 Feb 2005 : 09:12:00
The control reads the Default printer settings of the selected printer and that is what the Printer Setup dialog is initialized with. The control does not have a property or method that will permit you to have the Printer Setup initialized with the default values, except for the orientation which in your case you want to force to Landscape printing, regardless of the default value.
From the Windows desktop, if you can get the user to change the default setting of the target printer to Landscape, the settings for that printer will come up in Landscape mode from the controls Printer Setup. If changing the default printer settings is not an option, you can have two versions of the same printer in the Printers folder, one setup for Portrait and one for Landscape. Of course in that case the Printer Setup dialog is still needed to change the selected printer to the one that uses Landscape as the default, and that is more trouble than just clicking the Landscape radio button.
I'm sure an internet search would come up with some way to change the default printer under program control, or to change the settings of the default printer under program control.
It is not necessary to call Printer Setup every time you print. Once it is called, it will remember that you have change the printer orientation and print in Landscape until changed back.