I am wondering if there is any way to selectively clear parts of a console application, such as from (0,0) to (50, 50), as opposed to system("cls") to clear the whole screen. If possible, I would like to avoid having to store the contents of the screen into an array, clear out the whole screen, then put back the parts of the array that were not cleared.
Refresh Parts of Console Application
Page 1 of 12 Replies - 1365 Views - Last Post: 07 April 2010 - 03:35 PM
Replies To: Refresh Parts of Console Application
#2
Re: Refresh Parts of Console Application
Posted 07 April 2010 - 02:58 PM
nope, you cant just clear a section of the console.
#3
Re: Refresh Parts of Console Application
Posted 07 April 2010 - 03:35 PM
Maybe you could go some of the way to doing that with the gotoxy() function.
#include <windows.h>
void gotoxy(int x, int y)
{
COORD coord;
coord.X = x;
coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_H ANDLE), coord);
}
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|