Hi!
As a beginner in C/C++ I'm now practicing console applications under C++ Builder. Could anybody please tell me how to enlarge the default size of the programs' console? It is too litle for some of my applications and I wasn't able to find out an enlarging recipe in the C++ Builder environment.
Thanks in advance!

If you are a beginner better to do it by hand. Right click the command prompt shortcut in accessories, and select Properties. Then select the layout tab. There you can change the width and height. There are other options that can be set in the other tabs. Then when you click apply,select "save properties for window with same title."

If you are a beginner better to do it by hand. Right click the command prompt shortcut in accessories, and select Properties. Then select the layout tab. There you can change the width and height. There are other options that can be set in the other tabs. Then when you click apply,select "save properties for window with same title."

To Moderator.
1) Please first notice you just described above how to enlarge the Windows command prompt console, which I've already enlarged at the right time (I mean when installing my Windows).
2) However, you might just learn now that the default size of C++ Builder programs' console is a completely different matter than the one of the command prompt Windows accessory. Therefore your advice from above might be useful to you and your lovers at most.
3) Please do notice I was asking about how to do something while your answer was about how not to do that. So you might agree you were unpolite.
Best regards!
---------------------------
To forum participants.
Grateful thanks for any solution to my former problem!

1) Please first notice you just described above how to enlarge the Windows command prompt console, which I've already enlarged at the right time (I mean when installing my Windows).

First time I heard of someone like you, who changes the console size at installation.

2) However, you might just learn now that the default size of C++ Builder programs' console is a completely different matter than the one of the command prompt Windows accessory. Therefore your advice from above might be useful to you and your lovers at most.

Too bad. Don't you have anything better to do with your lovers?

Well if it is different from the command prompt, you can do it like this.
1. Click the icon of the C++ Builder command window
2. Select properties
3. Change the layout

3) Please do notice I was asking about how to do something while your answer was about how not to do that. So you might agree you were unpolite.

No I dont agree. I have done the same thing for my visual studio command prompt and it worked. I dont think you have even tried my solution. Anyway since this is your first false accusation, I will leave you in peace.

maybe this will help

#define _WIN32_WINNT 0x500
#include <iostream>
#include <windows.h>

using namespace std;

int main()
{
   HWND hWnd = GetConsoleWindow();
    ShowWindow(hWnd,SW_MAXIMIZE);
    cout << "Hello World\n";
    cin.get();
   return 0;
}

Grateful thanks Ancient Dragon,
Your code does work like a dream! You and other participants may trust there is no unfair bit in my claims from above.
Thanks again!

This article has been dead for over six months. Start a new discussion instead.