PDA

View Full Version : Printing External File in MFC


Nexic
08-23-2005, 03:05 AM
First off, I know this isn't really game related, but I don't belong to any other programming related forum (except Blitz, but this is C++) so I'm asking here.

Basically I want to get it so someone presses a button on my dialog it will automatically open and print an MS Word Document. Now I assumed because in windows you can right click on a text file and select print to print using the default word processing software, there must be some kind of windows command to do the same thing?

I've searched the net for quite a while, and even tried looking it up at msdn but can't find anything :-\ (I'm using VC++ 6.0 and MFC)

Emmanuel
08-23-2005, 03:27 AM
Sure, ShellExecute() will lpOperation being "print".

Best regards,
Emmanuel

Nexic
08-23-2005, 03:31 AM
Excellent! Worked perfectly :)

Thanks