Advertisement
Guest User

Maximize.Console.C.Jiiro

a guest
Sep 16th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. struct SMALL_RECT {
  2.     SHORT Left;
  3.     SHORT Top;
  4.     SHORT Right;
  5.     SHORT Bottom;
  6. };
  7. void adjustWindowSize(){
  8.     struct SMALL_RECT test;
  9.  
  10.     HANDLE hStdout;
  11.     COORD coord;
  12.     BOOL ok;
  13.  
  14.     hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
  15.     coord.X = 100;
  16.     coord.Y = 50;
  17.     ok = SetConsoleScreenBufferSize(hStdout, coord);
  18.  
  19.     test.Left = 0;
  20.     test.Top = 0;
  21.     test.Right = coord.X-1;
  22.     test.Bottom = coord.Y-1;
  23.  
  24.     SetConsoleWindowInfo(hStdout, ok, &test);
  25.  
  26. } //sets console to full screen by default
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement