Last active
May 5, 2016 15:39
-
-
Save KaeLL/6050345 to your computer and use it in GitHub Desktop.
Primeira versão de alterações!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
void cls() | |
{ | |
COORD coordScreen = { 0, 0 }; | |
DWORD dwConSize, | |
cCharsWritten; | |
CONSOLE_SCREEN_BUFFER_INFO csbi; | |
if ( !GetConsoleScreenBufferInfo( GetStdHandle( STD_OUTPUT_HANDLE ), &csbi )) return; | |
dwConSize = csbi.dwSize.X * csbi.dwSize.Y; | |
if ( !FillConsoleOutputCharacter( GetStdHandle( STD_OUTPUT_HANDLE ), ( TCHAR )' ', dwConSize, coordScreen, &cCharsWritten )) return; | |
if ( !GetConsoleScreenBufferInfo( GetStdHandle( STD_OUTPUT_HANDLE ), &csbi )) return; | |
if ( !FillConsoleOutputAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten )) return; | |
SetConsoleCursorPosition( GetStdHandle( STD_OUTPUT_HANDLE ), coordScreen ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment