Flashing underline using console

This is probably something very simple, but Google doesn't seem to have an answer. Is there a simple command for the console program to stop the blinking cursor? In front of my program, it has a percentage of load, but when it is updated, the cursor is messed up, and it is really annoying. I know that this is possible, he has many programs. Which command turns the underline blinking on and off?

+6
source share
1 answer

You can hide the cursor by calling SetConsoleCursorInfo . .

 #include <windows.h> void ShowConsoleCursor(bool showFlag) { HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_CURSOR_INFO cursorInfo; GetConsoleCursorInfo(out, &cursorInfo); cursorInfo.bVisible = showFlag; // set the cursor visibility SetConsoleCursorInfo(out, &cursorInfo); } int main() { ShowConsoleCursor(false); system("pause"); } 
+10
source

Source: https://habr.com/ru/post/950939/


All Articles