Solved

Problem with CPrintDialog

Posted on 1998-02-18
4
325 Views
Last Modified: 2013-11-20
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
0
Comment
Question by:atari
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
tflai earned 30 total points
ID: 1316357
FALSE == 0
CPrintDialog printDialog(0) == CPrintDialog w/ parent window handle 0.
Try "printDialog(this)".
0
 
LVL 1

Author Comment

by:atari
ID: 1316358
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)' ???


0
 
LVL 4

Expert Comment

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

0
 
LVL 1

Author Comment

by:atari
ID: 1316360
Thanks a lot !

atari
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question