c++ console screen size

倾然丶 夕夏残阳落幕 提交于 2019-12-05 12:59:16

You can #include <windows.h> and call GetConsoleScreenBufferInfo. To use this, you'll need a Windows handle to your standard output stream, which you can retrieve with GetStdHandle.

Be aware that the resulting code will be Windows-specific (whereas your current code is portable, so it should run fine on Linux, Mac OS, *BSD, etc.)

I found out that it's impossible to make the console application window to be bigger than a bit more than half of your screen, like it also is for cmd(command prompt). I'm just warning you that if you can't manually resize it to whatever size you want, you probably can't make it resize. Perhaps you want to try windows application or windows forms application?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!