Output from screen to printer
-
Hello, I have written a C++ program. I have compiled,built and executed the program. It works fine. I want to be able to send the output on the screen to a printer. How can I nclude this option. Can I use MFC? In other words how do I display my program on a page that contains the options for print view, print,save etc. Thank You
-
Hello, I have written a C++ program. I have compiled,built and executed the program. It works fine. I want to be able to send the output on the screen to a printer. How can I nclude this option. Can I use MFC? In other words how do I display my program on a page that contains the options for print view, print,save etc. Thank You
Have you considered:
FILE *pOutput = fopen("LPT1:", "w");
fprintf(pOutput , ...);
fclose(pOutput);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
-
Hello, I have written a C++ program. I have compiled,built and executed the program. It works fine. I want to be able to send the output on the screen to a printer. How can I nclude this option. Can I use MFC? In other words how do I display my program on a page that contains the options for print view, print,save etc. Thank You
First off I have seen you post this at least 4 times. Yet, everyone who responds seems to be thinking like a rocket scientest. For anyone who reads this, all he wants to do is provide printing options for his program. i.e. File ... Print. It's a simple concept. From what I've read over the last week or so, he has a console application that does a bunch of stuff and displays it on the screen in the console. All that he wants to do is print what's in the console. So anyone that knows a simple way of printing from the console, post it, so we don't have to continue reading the same post. Brimid, I told you before, go to the printing section of this site and read some of the articles. I'll even point a few out to you in a few mins. I don't know what to tell you about using MFC, because its not something you can just jump right into and understand. It takes time. But I'll go find a few articles for you to look at anyway.
-
Hello, I have written a C++ program. I have compiled,built and executed the program. It works fine. I want to be able to send the output on the screen to a printer. How can I nclude this option. Can I use MFC? In other words how do I display my program on a page that contains the options for print view, print,save etc. Thank You
Here's some links. http://www.codeproject.com/printing/printing_wo_docview.asp[^] This is an article showing some generic printing functions. It's what I used to learn how to print. It uses MFC however. If your program isn't real big I might be able to help you out. http://www.codeproject.com/printing/printingtricksandtips.asp[^] There's some good tips in this article. http://www.codeproject.com/printing/printmechanism.asp[^] This article might help, haven't really looked at it much though. Again all of these use MFC and if your program isn't too big, maybe I can help you out with it.
-
Hello, I have written a C++ program. I have compiled,built and executed the program. It works fine. I want to be able to send the output on the screen to a printer. How can I nclude this option. Can I use MFC? In other words how do I display my program on a page that contains the options for print view, print,save etc. Thank You
#include <fstream>
int main(int, char*)
{
ofstream Printer ("lpt1:");
Printer << "Test" << endl;
return 0;
}Works if the printer is connected to your parallel port, not sure about USB printers.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!