![]() |
Add color to console projects
When a new process is created, the "subsystem" field in the executable file header determines whether it was linked as a console (also called CUI or "character-based") or graphical user interface (GUI) application. A console application has a character-mode console window, which it inherits from its parent process upon its creation; if the parent process is not attached to a console, Windows creates a new console and is associates it with the launched application. A newly created GUI application is not attached to a console even if it is launched from a console application.
In C++ it is not possible to change colors but it can be done with help of Win 32. It is not necessary to concern yourself over the values of the various bits. There are a series of constants defined in windows.h, (actually in wincon.h but that is included in windows.h), which symbolically allow you to build the required value, it is very easy. Look at this program Code: CPP
Code: CPP
|
Re: Add color to console projects
wow i didnt kew about this
|
| All times are GMT +5.5. The time now is 16:21. |