[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Problem with CPrintDialog

Posted on 1998-02-18
4
Medium Priority
?
339 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 120 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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: 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…
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.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

656 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