I need to be able to store the most recently used paper orientation from the last app session and restore it the next time the program is run. Storing it is no problem, but I can't work out how to do the switch.
I'm using MFC 2.5 which handles all printer settings thorugh CPrintDlg (a wrapper for the PRINTDLG structure). Any changes the user makes are hidden away inside the common print dialog procedure, so there's no clues there. Simply modifying the DEVMODE structure (stored by CWinApp) causes system errors, so I assume the update must be done within a Windows function.
The solution needs to be compatible with the MFC 2.5 printing framework. Any suggestions? Thanks.