is there any c++ code that allows me to print the screen?
This is a discussion on how do i print the screen? within the C++ Programming forums, part of the General Programming Boards category; is there any c++ code that allows me to print the screen?...
is there any c++ code that allows me to print the screen?
if you mean print in text mode try this
#include <iostream.h>
void main()
{
cout << "I am printing to the screen";
}
the #include directive with <iostream.h> is necessary for using the cout statement.
Ryan
I do believe that "print the screen" means print the screen to the default printer. Yes you can do it. It takes a lot more code than you are probably ready for though.
This is a sampling of what 'just' writing to the the parallel port involves... it doesn't include reading the video buffer, etc.
Code:#include <conio.h> #include <stdio.h> int _outp( unsigned short port, int databyte ); // This program accepts an input from the user // in decimal and outputs that number as an 8-bit // binary number to the port at 378 hex, usually // LPT1 int main () { int inval = 0; while ( inval < 256) { printf("Enter a value in decimal (256 to quit)>"); scanf("%d", &inval); _outp(0x378, inval); } _outp(0x378, 0); return 0; }
Blue
Or as I like to call it... "The right way." hahahah