Created
April 26, 2016 07:49
-
-
Save astrcomp/f30b2172f0594e0cb239040f717ecae0 to your computer and use it in GitHub Desktop.
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
| CONSOLE_SCREEN_BUFFER_INFO csbiInfo; | |
| HANDLE io = GetStdHandle(STD_OUTPUT_HANDLE); | |
| SetConsoleTextAttribute(io, BACKGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY); | |
| printf("Test string: red on blue\n"); | |
| printf("dasdasdsdasdada "); | |
| GetConsoleScreenBufferInfo(io, &csbiInfo); | |
| printf("%d %d", csbiInfo.dwCursorPosition.X, csbiInfo.dwCursorPosition.Y); | |
| COORD cursorPos; | |
| cursorPos.X = 30; | |
| cursorPos.Y = 3; | |
| SetConsoleCursorPosition(io, cursorPos); | |
| // Выводим строку | |
| printf("Test string at position (30, 3)"); | |
| // Повторяем с другими координатами... | |
| cursorPos.X = 15; | |
| cursorPos.Y = 8; | |
| SetConsoleCursorPosition(io, cursorPos); | |
| cout << "t "; | |
| printf("Test string at position (15, 8)"); | |
| getchar(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment