Solved

Problem with CPrintDialog

Posted on 1998-02-18
4
334 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

717 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