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??

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PrintDlgEx is declared in Commdlg.h, include Windows.h.
And need to link against Comdlg32.lib.
Minimum operating systems Windows 2000.
SterlingMcClungAuthor Commented:
I hav tried that.  I still get errors.  Is it posible that it is something with Dev-C++???
What's the exact error? Are you on Windos 2000 or above?
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

SterlingMcClungAuthor Commented:
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
SterlingMcClungAuthor Commented:
i will check exact error when I get to work
SterlingMcClungAuthor Commented:
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.
>>> 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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SterlingMcClungAuthor Commented:
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.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.