Link to home
Start Free TrialLog in
Avatar of wellwet
wellwet

asked on

How to set Landscape for the printdlg by code

Hi Experts,

After display the print dialog box, the user can click the property button and select Landscape. How can I do something to set Landscape for the printdlg by code, so the user needn't to select that, something like:

PRINTDLG pd;
 memset(&pd, 0, sizeof(PRINTDLG));
 pd.lStructSize = sizeof(PRINTDLG);
 pd.Flags = PD_RETURNDC;
 if(PrintDlg(&pd) != 0)
{pd.landscape = true???
ASKER CERTIFIED SOLUTION
Avatar of msiladin
msiladin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wellwet
wellwet

ASKER

Sorry, can you give me a C style as well?
I am doing a project will many C++, but that is in C :-(