I've a question how can you change dte size of a console window the standart has 80width and 25 height how can I changed it that it is 80width and 50 height
thank you for your help
I've a question how can you change dte size of a console window the standart has 80width and 25 height how can I changed it that it is 80width and 50 height
thank you for your help
That's operating system specific. If you are using windows, you can do this with the SetConsoleScreenBufferSize functions in wincon.h (#include<windows.h>). It's parameters are a console screen buffer handle and the dimensions of the new buffer ( a COORD with the X components being the width and the Y component being the height ). You can get the current console screen buffer handle by calling GetStdHandle with the parameter STD_OUTPUT_HANDLE
The default font is terminal which is a raster font at 8 pixels wide by 12 pixels tall, so rather than jumping to 80x50, i suggest you either go to 80x40 (which would be 640x480 resolution) or 100x50 (which is 800x600 resolution).
Quick example:
COORD BufferSize = { 100, 50 };
SetConsoleScreenBufferSize( GetStdHandle( STD_OUTPUT_HANDLE ), BufferSize );
voila (remember to include windows.h)
Thanks a lot it is working, and now a another question how can i set up it that when the program starts it automatickly change in the full size window
3 in the button and the one in the middle
You mean the max size capable of the user's desktop?Originally posted by PawelK
Thanks a lot it is working, and now a another question how can i set up it that when the program starts it automatickly change in the full size window
3 in the button and the one in the middle
There's a command to recall that information, Cant remember
it though Try searching MSDN for it.
Try looking harder
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]