Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Pause()
- {
- printf("Press enter to continue ...");
- getchar();
- }
- void ClearScreen()
- {
- HANDLE hStdOut;
- CONSOLE_SCREEN_BUFFER_INFO csbi;
- DWORD count, cellCount;
- COORD homeCoords = { 0, 0 };
- hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
- if (hStdOut == INVALID_HANDLE_VALUE)
- return;
- if (!GetConsoleScreenBufferInfo(hStdOut, &csbi))
- return;
- cellCount = csbi.dwSize.X * csbi.dwSize.Y;
- if (!FillConsoleOutputCharacter(hStdOut, (TCHAR) ' ', cellCount, homeCoords, &count))
- return;
- if (!FillConsoleOutputAttribute(hStdOut, csbi.wAttributes, cellCount, homeCoords, &count))
- return;
- SetConsoleCursorPosition(hStdOut, homeCoords);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement