Printing How?
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Hi all I create a file by using CStdioFile. I want to sent this file to Printer, which function should i use? Thanks
-
Use
ShellExecute()
ShellExecute(m\_hWnd, "print", "MyFile.txt", NULL, NULL, SW\_HIDE);
This will execute the program associated with the .txt extension and tell it to print the file.
-
Use
system()
system("copy "MyFile.txt" lpt1:");
This will send the file to the printer using the DOS copy command. Note that the last (partial) page will probably not be printed, unless you send a formfeed.
-
Use MFC's doc/view printing architecture. See the Printing section here on CP for more details.
HPS HwndSpy - GUI developer's aid to visually locate and inspect windows. For the month of August only, use coupon code CP-81239 for 30% off.
-