MCPcopy Create free account
hub / github.com/Apache553/SubtitleFontHelper / EraseLineStruct

Class EraseLineStruct

FontDatabaseBuilder/ConsoleHelper.h:46–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44const SetOutputAttr SetOutputWhite{FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN};
45
46struct EraseLineStruct
47{
48 static void EraseLine()
49 {
50 HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
51 if (handle != INVALID_HANDLE_VALUE && handle != nullptr)
52 {
53 CONSOLE_SCREEN_BUFFER_INFO info;
54 if (GetConsoleScreenBufferInfo(handle, &info))
55 {
56 info.dwCursorPosition.X = 0;
57 DWORD written;
58 SetConsoleCursorPosition(handle, info.dwCursorPosition);
59 FillConsoleOutputCharacterW(handle, L' ', info.dwMaximumWindowSize.X, info.dwCursorPosition, &written);
60 }
61 }
62 }
63};
64
65const EraseLineStruct EraseLine;
66

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected