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

Is there an instruction in c++ to copy the screen (dos box).

Status
Not open for further replies.

pilg

Programmer
Feb 16, 2001
82
GB
when my cprogram has finished i would like to copy the screen and paste it into a file is this possible, I know you can write to a file but can you copy and paste.
 
if yo're using borlandC++ see in conio.h function gettext. In MicrosoftC++ also exist some console posibilities. John Fill
1c.bmp


ivfmd@mail.md
 
I'm not very experianced in microsoft c++ is there any chance you could be more specific, I'm using microsoft c++
 
I think it is a question to IonelBurtan. He know it better. Ion Filipski
1c.bmp


filipski@excite.com
 
In the microsoft DOS window, there is a button that is a box made out of dashed lines. Use this to select the part of the screen you want, then use the button that looks like sissors to cut it, then you can paste it in any text editing document you want
 
You should try to use the API function
GetStdHandle(STD_OUTPUT_HANDLE) and pass the HANDLE obtained to a call to ReadFile/ReadConsoleInput/ReadConsoleOutput APIs.

Hope this helps, s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Also look for the "Console" sample inside MSDN Samples. It has a method called demoReadConOut which makes a demo of the ReadConsoleOutput.

Of course all this APIs are working on OS Windows, I don't know any C++ console function that can otherwise help you.

Hope this helps, s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top