Changing text and window size

I would like to find out a way to set the text and window sixe for the window in c++. I am using code::blocks compiler
Last edited on
There is no portable way to do this (unless you use a lib like NCurses). Anything you do will be platform specific. Are you on Windows?

Besides, it's a user setting, which means you probably shouldn't mess with it. Many people -- particularly those that use the console frequently -- configure their console to look a certain way. It's annoying when programs throw away your preferences and substitute their own.

Why do you need to do this, anyway?
I am on windows. I am doing this for looks. so are you saying there is no way to do I though code?
I am on windows. I am doing this for looks


Right click on the title bar of your console window, go to "Defaults"

Select the "Font" tab - change the font size.

Go to the "Layout" tab - change the window size.

Hit OK

so are you saying there is no way to do I though code?


I'm not saying that. You can do this through code (though on Windows, it's difficult). What I'm saying is that you shouldn't because people have their own settings that they prefer. Just because you like your font bigger does not mean other people will.

Good programs respect other user's personal preferences and do not disregard them to substitute in their own.


As for doing it through code... WinAPI has a "SetConsoleFont" function, but it appears to be 'undocumented' so I'm having trouble finding it on MSDN... and this is a big sign that it's probably not a good idea to use this function. But I'll see if I can dig up some examples anyway.
Hay
you have change your window size and text
means follows the below steps

>Open Internet Explorer by clicking the Start button Picture of the Start button, and then clicking Internet Explorer.

>Click the Page button, click Text Size, and then click the size you want.

Topic archived. No new replies allowed.