How can we change the cursor to a null cursor in VC++ win32 console applications??
Also is there any way to copy the text on the console in a string!!
Thankx in advance...
How can we change the cursor to a null cursor in VC++ win32 console applications??
Also is there any way to copy the text on the console in a string!!
Thankx in advance...
>>> change the cursor to a null cursor in VC++ win32 console applications
Use the SetConsoleCursorInfo() API function, look it up in the help.
>>> way to copy the text on the console in a string
Since you put all the text there, surely you already have access to this?
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
Ok thanks for part 1
However I require to read all the text on the console so that even after the screen in cleared i can restore it again. Something like:
char Screen[4096];//global variable
GetScreen(Screen);
system("cls");
cout<<Screen;
Thanks in advance
I'm not sure you can do this, I've never tried, but I don't recall any API function for getting the console buffer's contents, GetConsoleScreenBufferInfo() will give you the current screen buffer settings.
Again, I would suggest that as you've written the stuff, you already know what was there. Create a dummy buffer and write everything into this buffer at the same time you write to the console, you can then redraw it if necessary, (kind of like a memory DC and a BitBlt() function). I can't think why you would want to do this.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.