Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. PrintDlgEx, Visual C++ 6.0, and the Platform SDK

PrintDlgEx, Visual C++ 6.0, and the Platform SDK

Scheduled Pinned Locked Moved C / C++ / MFC
c++questioncomhelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jonathan Craig
    wrote on last edited by
    #1

    I'm trying to use the PrintDlgEx method with Visual C++ 6.0. I have installed the Platform SDK (October 2002) and the include, lib, and exe directories for this are first in the directories option. But I keep getting "error C2065: 'PRINTDLGEX' : undeclared identifier." It appears the complier is not look at the stuff in my "C:\Microsoft SDK" directories. So what is required to get Visual C++ using the Platform SDK includes, libs, and exes? Thanks for all input ;) Jonathan Craig www.mcw-tech.com

    M 1 Reply Last reply
    0
    • J Jonathan Craig

      I'm trying to use the PrintDlgEx method with Visual C++ 6.0. I have installed the Platform SDK (October 2002) and the include, lib, and exe directories for this are first in the directories option. But I keep getting "error C2065: 'PRINTDLGEX' : undeclared identifier." It appears the complier is not look at the stuff in my "C:\Microsoft SDK" directories. So what is required to get Visual C++ using the Platform SDK includes, libs, and exes? Thanks for all input ;) Jonathan Craig www.mcw-tech.com

      M Offline
      M Offline
      mwilliamson
      wrote on last edited by
      #2

      You must define _WIN_NT 0x500 in stdafx before you include the common dialog files. This means that your application will only run on windows 2000 / xp (which is when printdlgex as added).

      J 1 Reply Last reply
      0
      • M mwilliamson

        You must define _WIN_NT 0x500 in stdafx before you include the common dialog files. This means that your application will only run on windows 2000 / xp (which is when printdlgex as added).

        J Offline
        J Offline
        Jonathan Craig
        wrote on last edited by
        #3

        I don't see anywhere in the SDK include files a reference to _WIN_NT. I have added #define _WIN32_WINNT 0x0500 and #define WINVER 0x0500 to the stdafx.h file but I still get the same error. Jonathan Craig www.mcw-tech.com

        M 1 Reply Last reply
        0
        • J Jonathan Craig

          I don't see anywhere in the SDK include files a reference to _WIN_NT. I have added #define _WIN32_WINNT 0x0500 and #define WINVER 0x0500 to the stdafx.h file but I still get the same error. Jonathan Craig www.mcw-tech.com

          M Offline
          M Offline
          mwilliamson
          wrote on last edited by
          #4

          Sorry, my mistake. From CommDlg.h: #if(WINVER >= 0x0500) // // PrintDlgEx structure. // typedef struct tagPDEXA { DWORD lStructSize; // size of structure in bytes HWND hwndOwner; // caller's window handle HGLOBAL hDevMode; // handle to DevMode HGLOBAL hDevNames; // handle to DevNames HDC hDC; // printer DC/IC or NULL DWORD Flags; // PD_ flags DWORD Flags2; // reserved DWORD ExclusionFlags; // items to exclude from driver pages DWORD nPageRanges; // number of page ranges DWORD nMaxPageRanges; // max number of page ranges LPPRINTPAGERANGE lpPageRanges; // array of page ranges DWORD nMinPage; // min page number DWORD nMaxPage; // max page number DWORD nCopies; // number of copies HINSTANCE hInstance; // instance handle LPCSTR lpPrintTemplateName; // template name for app specific area LPUNKNOWN lpCallback; // app callback interface DWORD nPropertyPages; // number of app property pages in lphPropertyPages HPROPSHEETPAGE *lphPropertyPages; // array of app property page handles DWORD nStartPage; // start page id DWORD dwResultAction; // result action if S_OK is returned } PRINTDLGEXA, *LPPRINTDLGEXA; #endif That means you need to define WINVER at 0x0500 before including Windows.h or CommDlg.h.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups