[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

printDlgEx()

Posted on 2004-10-27
8
Medium Priority
?
370 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
  • 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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Question has a verified solution.

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

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
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…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month7 days, 17 hours left to enroll

607 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