OpenConsole() Inhibit F11 fullscreen mode
Posted: Thu Nov 09, 2023 12:50 pm
Following the recent thread about inhibiting CTRL/C, does anyone know if there is a way to prevent F11 fullscreen mode? F11 brings unwanted consequences, including the obvious change of screen geometry from the more recent standard of 30 lines.
EDIT — I found it at last, the API is SetConsoleMode and it works well.
EDIT — I found it at last, the API is SetConsoleMode and it works well.
Code: Select all
DWORD previousMode; // typically(?) 0x1f7
GetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), &previousMode);
auto newMode = previousMode & (~ENABLE_PROCESSED_INPUT);
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), newMode);