Languages :: General :: refreshing printer settings for an active application in win32 api |
|||
| By: camellia |
Date: 15/07/2006 07:12:40 |
Points: 20 | Status: Answered Quality : Excellent |
|
I'm using VC++ 6.0 (not .NET) to drive Word, Excel and PowerPoint (through the MFC way). The app logic is to open a word instance (for example) and then print a bunch of different documents. Before printing each document, I will change the registry settings of the printer (which affect the global printer settings so to speak) and hope that each document will be printed with different settings The problem I come across right now is, I found out that each Word application instance will get from the os the global printer settings at the time of application start and remember that for its whole life span. Therefore, the print settings which I want to apply to a particular document (within the same word application instance) can't be enforced. I've tried DevMode but some of the printer settings are really unique and we don't have these insider information from the printer vendor. So, my question: is there any win32 api functions (with sample codes) that can enforce an active application to 'refresh' its printer settings from the global settings? Without going through to hack the DEVMODE fields? Please let me know. Thanks! |
|||
| By: VGR | Date: 17/07/2006 09:15:00 | Type : Answer |
|
| Ok, I have no clear idea myself, but I will try to give out some useful documentation. I suppose you already read this M$ KB entry so, you see, I guess you have to use DEVMODE, and I see that using it is not that difficult. Specifically :
As far as your problem of "modifying the settings for all applications" stands, this page can also be helpful being read. Good luck. |
|||
| By: camellia | Date: 17/07/2006 09:26:38 | Type : Comment |
|
| VGR, Thanks a lot! |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








