how to Set Default Printer 
Author Message
 how to Set Default Printer

Can someone tell me how to set a default printer with my application. When try to
use SetDefaultPrinter with #include the compiler returns an error
message: error C2039: 'SetDefaultPrinter' : is not a member of '`global
namespace''
.


Sat, 29 Nov 2003 15:07:10 GMT  
 how to Set Default Printer

Quote:
>Can someone tell me how to set a default printer with my application. When try to
>use SetDefaultPrinter with #include the compiler returns an error
>message: error C2039: 'SetDefaultPrinter' : is not a member of '`global
>namespace''

SetDefaultPrinter is a W2K specific API, so you'll need the up-to-date
headers and libraries supplied with a recent Platform SDK. You'll also
need to #define _WIN32_WINNT=0x0500 and WINVER=0x0500.

If you check the Platform SDK documentation on SetDefaultPrinter
you'll see sample code to do the same thing in a platform independent
manner.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sat, 29 Nov 2003 18:06:29 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Q: How to set default printer bin?

2. how to Set Default Printer

3. How to set default printer font

4. Windows Default Printers and Default Printer Setups

5. Set Default Printer

6. Set default printer

7. Problems Setting the Default printer with Win32 API SDK

8. Help : How to set the default printer

9. Setting the Default Printer

10. Setting default printer via DEVMODE struct and EnumPrinters

11. Setting default printer in Win NT, and 2000

12. Setting the default windows printer

 

 
Powered by phpBB® Forum Software