PDA

View Full Version : Printer page orientation setting


Peter Thiessen
August 25th 04, 04:16 AM
How does one set printer page orientation to landscape
from within a running application without using the SetUp
dialog box? I have tried code using DocumentProperties()
and SetPrinter() as given in MSKBA 140285 and 167345. The
code compiles and runs OK, and the dmOrientation member of
DEVMODE structure does become set to DMORIENT_LANDSCAPE
=2, but the transfer to the printer driver does not seem
to connect. Also, should this code be placed before or
after the call to Printdlg( &printdlg )? Windows 98 SE.
Any help would be much appreciated.