How can I resize the Command Prompt window programmatically in C or C++? For example 80x25 or 80x40 characters. Thank you in advance.
If you want to adjust the width and height values manually, you can right-click the Title bar and click Properties. In the Properties window, click the Layout tab. By adjusting these values, you can make a window that occupies almost all of the screen in all versions of Windows.
If you just open the batch file, click on the window, and then click "properties", and then to "layout", and scroll down to "Window Size", you can edit it from there. It will also stay that way every time you open that specific batch file, so it's pretty handy.
The default command prompt dimensions are 677, 343. The height being 677 and the width being 343, hope this helps.
SetConsoleWindowInfo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With