• Advertisement
Sign in to follow this  

console window size

This topic is 4550 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
well I know nothing about .net specific stuff yet. I assume .net calls won't work with standard .cpp files?

Share this post


Link to post
Share on other sites
Because MS included many new additions to the console, .NET 2.0 is simply...

System::Console::WindowWidth = 100; // Console Width
System::Console::WindowHeight = 47; // Console Height

Since it's close for release, a switch to 2.0 beta may be of interest. Hope it helps! :)

Share this post


Link to post
Share on other sites
interesting, benryves...I'm gonna have to play around with some of that stuff. :D

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement