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. Hook Print Dialog in Word

Hook Print Dialog in Word

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studiojsonhelpquestion
6 Posts 4 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.
  • P Offline
    P Offline
    pgibson007700
    wrote on last edited by
    #1

    I am using a system wide hookapi DLL which hooks StartDocA, StartDocW, EndDoc, PrintDlgExA, PrintDlgExW the latter so I can obtain the number of copies, page range etc. My hook DLL works for NotePad, WordPad etc but the problem I have is Word (and I presume the other Office applications) does not appear to use PrintDlgA, PrintDlgW, or the Ex versions to display the Print dialog and hence I cannot obtain the number of copies, page range etc. Does anyone know which API Word is using to display the Print dialog ? I am using Visual Studio .NET 2003, Windows XP (with SP2) and Office XP. Thanks in advance :confused:

    M M 2 Replies Last reply
    0
    • P pgibson007700

      I am using a system wide hookapi DLL which hooks StartDocA, StartDocW, EndDoc, PrintDlgExA, PrintDlgExW the latter so I can obtain the number of copies, page range etc. My hook DLL works for NotePad, WordPad etc but the problem I have is Word (and I presume the other Office applications) does not appear to use PrintDlgA, PrintDlgW, or the Ex versions to display the Print dialog and hence I cannot obtain the number of copies, page range etc. Does anyone know which API Word is using to display the Print dialog ? I am using Visual Studio .NET 2003, Windows XP (with SP2) and Office XP. Thanks in advance :confused:

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      pgibson007700 wrote:

      Does anyone know which API Word is using to display the Print dialog ?

      Maybe they use their own dialog and not an API?

      1 Reply Last reply
      0
      • P pgibson007700

        I am using a system wide hookapi DLL which hooks StartDocA, StartDocW, EndDoc, PrintDlgExA, PrintDlgExW the latter so I can obtain the number of copies, page range etc. My hook DLL works for NotePad, WordPad etc but the problem I have is Word (and I presume the other Office applications) does not appear to use PrintDlgA, PrintDlgW, or the Ex versions to display the Print dialog and hence I cannot obtain the number of copies, page range etc. Does anyone know which API Word is using to display the Print dialog ? I am using Visual Studio .NET 2003, Windows XP (with SP2) and Office XP. Thanks in advance :confused:

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        Office rolls their own controls and dialogs, they don't use the standard built-in dialogs.

        --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ"); Ford, what's this fish doing in my ear?

        P 1 Reply Last reply
        0
        • M Michael Dunn

          Office rolls their own controls and dialogs, they don't use the standard built-in dialogs.

          --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ"); Ford, what's this fish doing in my ear?

          P Offline
          P Offline
          pgibson007700
          wrote on last edited by
          #4

          Mike, thanks for that, I'll tackle the problem another way.:)

          N 1 Reply Last reply
          0
          • P pgibson007700

            Mike, thanks for that, I'll tackle the problem another way.:)

            N Offline
            N Offline
            nelsonlam
            wrote on last edited by
            #5

            >> I'll tackle the problem another way Would you like to tell to me ( and every body ) about your method ? :)

            P 1 Reply Last reply
            0
            • N nelsonlam

              >> I'll tackle the problem another way Would you like to tell to me ( and every body ) about your method ? :)

              P Offline
              P Offline
              pgibson007700
              wrote on last edited by
              #6

              Hi, gave up with this project a long while ago - never got any where with the Office products. I was using madCodeHook see http://www.madcodehook.com/madCodeHookDescription.htm[^] which worked for every application I tried except the Office suite ! The project as I said is now long forgotten and I don't write code anymore - retired due to ill health.

              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