It's a little more involved than you might expect.
Start by reading this thread:
Console: how change window size?
https://social.msdn.microsoft.com/Forums/en-US/0de248af-3497-4537-bb41-6d129b04fb27/console-how-change-window-size
- Wayne
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am developing a c++ console application and would like to increase the size of the default console window that is produced by c++ under vs19. If it is possible, how would that be achieved?
It's a little more involved than you might expect.
Start by reading this thread:
Console: how change window size?
https://social.msdn.microsoft.com/Forums/en-US/0de248af-3497-4537-bb41-6d129b04fb27/console-how-change-window-size
Hi KeithLovell,
Please view the similar issue and have a try with the following steps:
If there is something wrong, please feel free to contact us.
Best regards,
Anna
Give this a try to change the console colors -
#include <Windows.h>
#include <stdio.h>
int main() {
CONSOLE_SCREEN_BUFFER_INFOEX csbi{ sizeof csbi };
HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
GetConsoleScreenBufferInfoEx(hOutput, &csbi);
csbi.wAttributes = BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY;
SetConsoleScreenBufferInfoEx(hOutput, &csbi);
printf("Text to Console\n");
return 0;
}