How can I resize console window in dev-c++ ?

Recommended Answers

All 4 Replies

If ye' have a windows operating system ye' can do this:

include <windows.h>

void set_console_size()
     HANDLE hOut;
     SMALL_RECT DisplayArea = {0, 0, 0, 0};
     //set x and y to whatever ye' want
     int x = 125;
     int y = 55;

     hOut = GetStdHandle(STD_OUTPUT_HANDLE);
     DisplayArea.Right  = x;
     DisplayArea.Bottom = y;

     SetConsoleWindowInfo(hOut, TRUE, &DisplayArea);

thank you!!
and how can I hide the scroll box?


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.