I am trying to resize a console window to full screen in a non-.NET C++ application that runs under Windows 10.
I am able to get rid of the window frame and resize, using one of SetWindowPos
or MoveWindow
from the WinAPI.
But the window origin (top-left corner) does not move to the top-left corner of the screen and stays in its initial position, which is random. In fact, the X
, Y
arguments of these functions seem to be just ignored.
Any suggestion ?
SendMessage(hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0);
. – 500 - Internal Server ErrorShowWindow(hWnd, SW_MAXIMIZE);
, but you may want to check Console Virtual Terminal Sequences (SetConsoleMode +ENABLE_VIRTUAL_TERMINAL_PROCESSING
enables VT100 compatible mode, the suggested behavior - cross-platform compat). – Jimi