Commit a4c214e7 authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

Emulate the dos cmd 'cls'.

parent 6138ba08
......@@ -57,8 +57,20 @@ extern DWORD errorlevel;
void WCMD_clear_screen () {
WCMD_output (nyi);
/* Emulate by filling the screen from the top left to bottom right with
spaces, then moving the cursor to the top left afterwards */
COORD topLeft;
long screenSize;
CONSOLE_SCREEN_BUFFER_INFO consoleInfo;
HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
GetConsoleScreenBufferInfo(hStdOut, &consoleInfo);
screenSize = consoleInfo.dwSize.X * (consoleInfo.dwSize.Y + 1);
topLeft.X = 0;
topLeft.Y = 0;
FillConsoleOutputCharacter(hStdOut, ' ', screenSize, topLeft, &screenSize);
SetConsoleCursorPosition(hStdOut, topLeft);
}
/****************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment