Reputation: 2570
I am making one C program in which I want the function or any method to fix size of output console window. Is there any function or way in C language to perform this task?
Generally the shape of output console is rectangle but to display proper output of my program I want to fix the square shape so I want to re size the output console using the programming.
I am using GNU GCC compiler and Os is Microsoft Windows 8.1.
Upvotes: 1
Views: 2801
Reputation: 1620
C language don't have any function to control console property but you can use windows header file to control console.
You can get a handle to the console window using GetConsoleWindow.
Once you have that, you should be able to resize it using SetWindowPos
You may also need to resize the buffer for the console using SetConsoleScreenBufferSize prior to resizing the window.
Upvotes: 4
Reputation: 62553
No, there is no function or way in C language to alter the shape of the console.
Upvotes: 2