By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!> Has anyone else noticed that "CLS /C" is significantly slower in Win7
> than in XP?
Haven't noticed. All CLS /C does is call FillConsoleOutputCharacter and
FillConsoleOutputAttribute, so any timing difference would be in the console
API handling.
> I can do it with a plugin in 0:00:00.00.
> I can do it with a plugin in 0:00:00.00.
INT WINAPI FASTCLS ( WCHAR *psz )
{
CONSOLE_SCREEN_BUFFER_INFO csbi;
DWORD dwWritten;
COORD cdZero = {0, 0};
GetConsoleScreenBufferInfo(STD_OUT, &csbi);
FillConsoleOutputAttribute(STD_OUT, csbi.wAttributes,
csbi.dwSize.X * csbi.dwSize.Y, cdZero, &dwWritten);
FillConsoleOutputCharacter(STD_OUT, L' ',
csbi.dwSize.X * csbi.dwSize.Y, cdZero, &dwWritten);
SetConsoleCursorPosition(STD_OUT, cdZero);
return 0;
}