Hi!
I have modified the clrscr function, which I found it in the FAQ, and now I'm asking you guys is this modified function fast for clearing the screen?
Code:
void clrscr (short x, short y, short LengthErase, short NoOfLinesToErase)
{
COORD coord;
DWORD cCharsWritten;
CONSOLE_SCREEN_BUFFER_INFO csbi;
HANDLE hOutput;
short i = 0;
hOutput = GetStdHandle (STD_OUTPUT_HANDLE);
for (i = 0; i <= NoOfLinesToErase; i++)
{
coord.X = x;
coord.Y = y+i;
FillConsoleOutputCharacter (hOutput, TEXT (' '), LengthErase, coord, &cCharsWritten);
GetConsoleScreenBufferInfo (hOutput, &csbi);
FillConsoleOutputAttribute (hOutput, csbi.wAttributes, LengthErase, coord, &cCharsWritten);
}
}