For Code::Blocks with GNU GCC Compiler
Create a New Project... and choose a Console application.
This will give you a default "main.cpp" that simply prints "Hello world!".
Find or create an icon to represent your application. Add it to your project. Mine is named "spiffomatic.ico" .
Create a new file in your project named "resources.rc" . It doesn't have to be named "resources".
Add the following line to "resources.rc" :
Quelle: daniweb
Create a New Project... and choose a Console application.
This will give you a default "main.cpp" that simply prints "Hello world!".
Find or create an icon to represent your application. Add it to your project. Mine is named "spiffomatic.ico" .
Create a new file in your project named "resources.rc" . It doesn't have to be named "resources".
Add the following line to "resources.rc" :
PHP Code:
MAINICON ICON "spiffomatic.ico"
Color Codes:
Example Program:
Quelle: blockofcodes
PHP Code:
0 = Black
1 = Blue
2 = Green
3 = Aqua
4 = Red
5 = Purple
6 = Yellow
7 = White
8 = Gray
9 = Light Blue
A = Light Green
B = Light Aqua
C = Light Red
D = Light Purple
E = Light Yellow
F = Bright White
PHP Code:
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
int main()
{
system("COLOR C");
std::cout << "Welcome to the color changing application!\n";
return 0;
}
PHP Code:
#include <windows.h>
int main()
{
SetConsoleTitle( TEXT( "Adventure Game" ) );
...
}