atari
asked on
Problem with CPrintDialog
I want to ask the printer-configuration without displaying the printer-configuration-dial ogbox, 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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Then you should use CPrintDialog's constructor instead of CDialog's constructure:
CPrintDialog(BOOL bPrintSetupOnly, DWORD dwFlags, CWnd* pParentWnd);
CPrintDialog(BOOL bPrintSetupOnly, DWORD dwFlags, CWnd* pParentWnd);
ASKER
Thanks a lot !
atari
atari
ASKER
CPrintDialog PrintDialog(FALSE);
PrintDialog.GetDefaults();
Why does it work, also if I don't use '(this)' ???