|
-
April 26th, 1999, 10:16 PM
#1
Setting Default Printer in Win95/98/NT4 using C
I am trying to write a program in C/C++ for the win32 environment that will change a certain printer to the default printer. Any help I could get would be great!
-
April 27th, 1999, 07:10 AM
#2
Re: Setting Default Printer in Win95/98/NT4 using C
Hey Tom Salomone, Todd here Checking out documentation on SetPrinter() API and here's what I have. You want a PRINTER_INFO_2 structure, to call to SetPrinter.
SetPrinter(hPrinter,2,(PRINTER_INFO_2*)&pInfo,0);
For your pInfo PRINTER_INFO_2 structure, Set the Attributes field to contain PRINTER_ATTRIBUTE_DEFAULT.
I guess a call to GetPrinter would be used to fill the PRINTER_INFO_2 structure, then just modify the Attributes (pInfo.Attributes |= PRINTER_ATTRIBUTE_DEFAULT);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|