console window size

Started by
12 comments, last by gnomer 18 years, 7 months ago
Well I've been searching but I can't seem to find a way to change the default console size so I can have a bigger console window in my program. Anyone point me in the right direction? The only thing I found in MSDN was some System::Console::SetWindowSize(x,y) but that doesn't seem to work for me. I'm using visual studio .net 2003.
Advertisement
You might want to try SetConsoleScreenBufferSize().
I have used the
SetWindowSize(x,y)
before and it worked.

I did it like this:
using nsmespace system;Console::SetWindowSize(x,y);


I was using the VC++ 2005 Express beta1.

Also, what size did you set it too? I think if you make it too big it might not actually change size.
F-R-E-D F-R-E-D-B-U-R...G-E-R! - Yes!
Quote:Original post by DigiDude
using nsmespace system;Console::SetWindowSize(x,y);

That's a .NET call. SiCrane provided the Win32 equivalent.
any help setting up the arguments for SetConsoleScreenBufferSize()? I don't know handles or COORDS...I'm still quite the newb. I just want to make the window taller so more lines fit.
well i got it to work but it doesnt change the window size, just the buffer size... I want to stretch the viewable area to like 50 lines height instead of the default 25.
SetConsoleWindowInfo
thanks, lemme see if i can get it to work :)
ok I got it.

SetConsoleScreenBufferSize() sets the size of the buffer.
SetConsoleWindowInfo() sets the window size but cannot exceed the buffer size.

Makes sense now. I'm getting better at this stuff :D

Thanks for all the help.
Quote:Original post by Oluseyi
Quote:Original post by DigiDude
using nsmespace system;Console::SetWindowSize(x,y);

That's a .NET call. SiCrane provided the Win32 equivalent.

Well, I thought I would put it up since he's using Visual Studio .net
F-R-E-D F-R-E-D-B-U-R...G-E-R! - Yes!

This topic is closed to new replies.

Advertisement