Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resize CMD Window

How can I resize the Command Prompt window programmatically in C or C++? For example 80x25 or 80x40 characters. Thank you in advance.

like image 989
ctype.h Avatar asked Sep 26 '11 08:09

ctype.h


People also ask

How do I resize a DOS window?

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.

How do I resize a batch window?

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.

What is default window size for CMD?

The default command prompt dimensions are 677, 343. The height being 677 and the width being 343, hope this helps.


1 Answers

SetConsoleWindowInfo

like image 167
Richard Avatar answered Sep 29 '22 15:09

Richard