Solved

printDlgEx()

Posted on 2004-10-27
349 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
Question by:SterlingMcClung
    8 Comments
     
    LVL 16

    Assisted Solution

    by:nonubik
    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
    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
    What's the exact error? Are you on Windos 2000 or above?
    0
     
    LVL 7

    Author Comment

    by:SterlingMcClung
    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
    i will check exact error when I get to work
    0
     
    LVL 7

    Author Comment

    by:SterlingMcClung
    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:
    >>> 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
    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: From Zero to Hero with Nodejs & MongoDB

    Interested in Node.js, but don't know where to start or how to learn it properly? Confused about how the MEAN stack pieces of MongoDB, Expressjs, Angularjs, and Nodejs fit together? Or how it's even possible to run JavaScript outside of the browser?

    What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
    For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
    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…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    845 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now