changing console window

This is a discussion on changing console window within the C++ Programming forums, part of the General Programming Boards category; Is it possible to change the size, position, background colour, foreground colour of the default console window that the first ...

Programatically? Yes via the windows API. However this isn't necessarily something you want to focus to much on when just learning how to program. adrianxw has decent tutorials on console programming, however like I said not really something you want to focus on. Additionally, for GUI programming in C++, the suggested course is QT, however you really need to learn more C++ before diving into that.

Thanks for the advice Andrew and I realise it is sound; but it is infuriating having to do everything in a 7½ x 3½ window - I assume then that I cannot somehow change it from within Code::Blocks?

Oh, I think I see what you are saying. Just compile your code and then run it from the command prompt, this will give you the windows "dos window" which you can change the size of just like any other window. As for C::B I am not sure, perhaps there is some settings you can adjust. I am sure someone knows around here, also you can check your help file for C::B.

Manasij Mukherjee | gcc-4.9.2 @Arch Linux Slow and Steady wins the race... if and only if :1.None of the other participants are fast and steady.
2.The fast and unsteady suddenly falls asleep while running !

If you change "Color )G" to eg "Color f1" you get blue text on a white background, so until I am ready to start GUI programming that will do most of what I want.

Did you look at adrian's tutorials? If you want to do this, you might as well do it the right way. Click on that link I gave you and read through his console programming section; that will show you how to do what you want.

Sorry Andrew, I obviously misunderstood your first comments- I assumed you meant that changing colours etc couldn't be done except by getting into programming with Windows API - had another look and will study Adrian's tutorials closely later today.

Thanks for the advice Andrew and I realise it is sound; but it is infuriating having to do everything in a 7½ x 3½ window - I assume then that I cannot somehow change it from within Code::Blocks?

Actually you are working on a visual representation of the old DOS 25 x 80 screen... In CMD.EXE they've added buffering so you can scroll back but it's still a Command Line Interface, intended to deliberately emulate DOS.

Actually you are working on a visual representation of the old DOS 25 x 80 screen... In CMD.EXE they've added buffering so you can scroll back but it's still a Command Line Interface, intended to deliberately emulate DOS.