Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

printDlgEx()

Posted on 2004-10-27
8
Medium Priority
?
365 Views
Last Modified: 2013-12-03
I am trying to call the printer properties page using printDlgEx().  I currently have a program that uses printDlg(), but I would like to move that to printDlgEx().  My only problem is that I keep getting an error saying that it is undefined.  I have included all the files that M$ has said I need to, but it still is undefined.  I am using Dev-C++ and have tried updateing and everything.  Any ideas??

0
Comment
Question by:SterlingMcClung
[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
  • 5
  • 2
8 Comments
 
LVL 16

Assisted Solution

by:nonubik
nonubik earned 750 total points
ID: 12431302
PrintDlgEx is declared in Commdlg.h, include Windows.h.
And need to link against Comdlg32.lib.
Minimum operating systems Windows 2000.
0
 
LVL 7

Author Comment

by:SterlingMcClung
ID: 12434327
I hav tried that.  I still get errors.  Is it posible that it is something with Dev-C++???
0
 
LVL 16

Expert Comment

by:nonubik
ID: 12434403
What's the exact error? Are you on Windos 2000 or above?
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 7

Author Comment

by:SterlingMcClung
ID: 12435874
Windows 2003.  I am not at work now and can't remember exact wording, but it is as if I didn't include the right header, but I have checked and double checked.  I have even included commdlg.h along with windows.h
0
 
LVL 7

Author Comment

by:SterlingMcClung
ID: 12435926
i will check exact error when I get to work
0
 
LVL 7

Author Comment

by:SterlingMcClung
ID: 12436141
Here is the error that I am getting:

'printDlgEx' undeclared (first use in this function)

I am getting the same thing when I try declaring a PRINTDLGEX variable to use.

I just downloaded the newest platform SDK for Win Server 2003 and the same thing with that.
0
 
LVL 9

Accepted Solution

by:
BeyondWu earned 750 total points
ID: 12441416
>>> I just downloaded the newest platform SDK for Win Server 2003 and the same thing with that.

You need to update your head file(Commdlg.h). Maybe also need to update your Comdlg32.lib file...
After you installed the downloaded SDK, you should can compile your code successfully.
But if still not, you need to copy the Commdlg.h from your SDK folder to your VC++ include folder, something like this:C:\Program Files\Microsoft Visual Studio\VC98\Include, you can open Commdlg.h by hand and check if there is a 'printDlgEx' symbol in your file, if not, that means you haven't got the correct version of Commdlg.h file. so you need to overwrite your file.... If the linker reports the error that can't find the symbol, you also need to overwrite your Comdlg32.lib file...

Hope this can help you.
0
 
LVL 7

Author Comment

by:SterlingMcClung
ID: 12444511
Even with the new header files copied I get the error.  I am going to try using VisualStudio to see if it is just a problem with Dev-C++.  I can't use what I make in VS however, since it is a educational version.

0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

618 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