Link to home
Start Free TrialLog in
Avatar of atari
atari

asked on

Problem with CPrintDialog

I want to ask the printer-configuration without displaying the printer-configuration-dialogbox, so I programmed:

CPrintDialog printDialog(FALSE);

If I debug this codeline in VC++5.0 I always get a hwnd=0x0000. Does anybody knows, what's the cause for it ?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of tflai
tflai

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 atari
atari

ASKER

Why can I nevertheless ask for the printer-configuration by programming:

CPrintDialog PrintDialog(FALSE);
PrintDialog.GetDefaults();  ???

Why does it work, also if I don't use '(this)' ???


Then you should use CPrintDialog's constructor instead of CDialog's constructure:
CPrintDialog(BOOL bPrintSetupOnly, DWORD dwFlags, CWnd* pParentWnd);

Avatar of atari

ASKER

Thanks a lot !

atari