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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print with no Print Dialog

Status
Not open for further replies.

bulgakov

Programmer
Apr 24, 2003
26
GB
Can anyone please help me by providing an example of
how to print a view without the print dialog box
coming up, I just want to print the current view
with the default printer, thanks !

Marcus
 
Hi Marcus,
If u want to print the document.. without print dialog use

HINSTANCE ShellExecute(
HWND hwnd,
LPCTSTR lpOperation,
LPCTSTR lpFile,
LPCTSTR lpParameters,
LPCTSTR lpDirectory,
INT nShowCmd
);

Here use in place of second parameter lpOperation use "print" .. For further details refeer to MSDN.
Try it out if u can't make it out then I will mail u code.
Thanks
Ravi

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top