Rguess
asked on
Printing To default printer
I am trying to batch lprint in the background. However I get the print dialog box poping up when I execute
ShellExecute(Scr_hDC, "print", DocName, "", "C:\", 0)
Does anyone know how I can either control and select the printer that I want programatically or just send the document to a specified printer?
Thanks in advance!!
ShellExecute(Scr_hDC, "print", DocName, "", "C:\", 0)
Does anyone know how I can either control and select the printer that I want programatically or just send the document to a specified printer?
Thanks in advance!!
Does it bring up the print dialog for all types of files or just certain ones?
ASKER
for all files
ASKER
FYI --It is the box that asks you to select a printer.
Have you tried changing the system default printer before calling ShellExecute?
If not,here is how you can change it:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;266767
If not,here is how you can change it:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;266767
ASKER
Yes, I am changing the default printer.
If you right click a file and select print,does it also bring up the printer dialog box?
Is this only happening on a particular system?
Is this only happening on a particular system?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.