Hook Print Dialog in Word
-
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:
-
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:
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?
-
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:
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?
-
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?
Mike, thanks for that, I'll tackle the problem another way.:)
-
Mike, thanks for that, I'll tackle the problem another way.:)
-
>> I'll tackle the problem another way Would you like to tell to me ( and every body ) about your method ? :)
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.