Printing to the NOT default printer

Printing to the NOT default printer

Post by Alexandre CHMAKOTIN » Sat, 28 Jun 2003 18:22:19



Hello,

I use ShellExecute Win32 API function with the "print"
parameter to submit the print job of a file to the default
printer.
I'am wondering, how can I print a given file on the
printer of choice without setting this printer as a
default printer.

Thanks in advance for any help.
Alexandre CHMAKOTINE.

 
 
 

Printing to the NOT default printer

Post by David Lincol » Sat, 28 Jun 2003 19:29:01


Hi,

You could try looking at the group of GDI functions such as "EnumPrinters" and "OpenPrinter" and "StartDoc" to start the print job.

I've never *actually* used any of these functions, so I'm not sure how easy this is. Anyone else?

Cheers,
Dave.

 
 
 

Printing to the NOT default printer

Post by David Lownde » Sat, 28 Jun 2003 22:37:27


Quote:>I use ShellExecute Win32 API function with the "print"
>parameter to submit the print job of a file to the default
>printer.
>I'am wondering, how can I print a given file on the
>printer of choice without setting this printer as a
>default printer.

Try using the "printto" verb - if the application supports it.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq

 
 
 

Printing to the NOT default printer

Post by Nikos Bozini » Sat, 28 Jun 2003 22:41:41


see the "printto" verb

> Hello,

> I use ShellExecute Win32 API function with the "print"
> parameter to submit the print job of a file to the default
> printer.
> I'am wondering, how can I print a given file on the
> printer of choice without setting this printer as a
> default printer.

> Thanks in advance for any help.
> Alexandre CHMAKOTINE.