DEVMODE structure:
SetPrinter
Configuring DEVMODE structure for a printer
How to change display settings: screen resolution, screen refresh rate
Printing Image File, programmatically set print page orientation to landscape