Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

easy printing

Status
Not open for further replies.

consistomagus

Programmer
Aug 28, 2002
8
0
0
US
Is their any way in Visual C++ that I can just send a file into the Windows Print Q. I don't even care about opening it. I just want windows to print the file. Any tips will be appreciated.

Thanks
Consistomagus
 
Try this:
Code:
#include<windows.h>
int main()
{ 
    ShellExecute(NULL,&quot;print&quot;,&quot;path_to_file&quot;,NULL,NULL,NULL);
    return 0;
}

replace path_to_file with the file that contain the text that you want to print.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top