Reputation: 5369
I can change the size of console window like this:
mode con cols=64 lines=32
Though there are many api functions for console subsystem, I could not find any function for setting the size of console window.
Is it able to set the size of console window without calling
system ("mode con cols=64 lines=32");
Thanks.
Upvotes: 0
Views: 1401
Reputation: 125757
BOOL WINAPI SetConsoleWindowInfo(
_In_ HANDLE hConsoleOutput,
_In_ BOOL bAbsolute,
_In_ const SMALL_RECT *lpConsoleWindow
);
hConsoleOutput
is a screen buffer handle returned by CreateConsoleScreenBuffer
.
Upvotes: 2