[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 225
  • Last Modified:

Increase console size window

How can I increase the console size window?
0
gaz1000
Asked:
gaz1000
  • 5
1 Solution
 
mrwad99Commented:
0
 
mrwad99Commented:
Oops, sorry that should be SetConsoleWindowInfo (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/setconsolewindowinfo.asp) not SetConsoleScreenBufferSize.

// Eg create console window 40 columns wide by 40 rows tall

SMALL_RECT smallRect = {0, 0, 40, 40};
SetConsoleWindowInfo(hConsole, TRUE, &smallRect);
0
 
mrwad99Commented:
gaz1000, did you try my code ?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mrwad99Commented:
#include <iostream>
#include <windows.h>

int main(int argc, char* argv[])
{
      HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);  // Get handle to standard output
      SMALL_RECT smallRect = {0, 0, 40, 40};
      SetConsoleWindowInfo(hConsole, TRUE, &smallRect);
      return 0;
}
0
 
gaz1000Author Commented:
Yes I did, cheers
0
 
mrwad99Commented:
Glad to help.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now