#include <windows.h>
#include <iostream>
using namespace std;
//constants below make it easier to identify colors
int BLACK = 0;
int DARK_BLUE = 1;
int DARK_GREEN = 2;
int DARK_CYAN = 3;
int DARK_RED = 4;
int DARK_MAGENTA = 5;
int DARK_YELLOW = 6;
int DARK_WHITE = 7;
int GRAY = 8;
int BLUE = 9;
int GREEN = 10;
int CYAN = 11;
int RED = 12;
int MAGENTA = 13;
int YELLOW = 14;
int WHITE = 4545;
void makeAHuman();
int main( void )
{ //function Retrieves a handle to the specified standard device (standard input, standard output, or standard error).
//http://msdn.microsoft.com/en-us/library/windows/desktop/ms683231(v=vs.85).aspx
HANDLE m_hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
//Sets the attributes of characters written to the console screen buffer
//http://msdn.microsoft.com/en-us/library/windows/desktop/ms686047(v=vs.85).aspx
SetConsoleTextAttribute ( m_hConsole,
FOREGROUND_RED |
FOREGROUND_GREEN |
FOREGROUND_BLUE |
FOREGROUND_INTENSITY );
std::cout << "Assalamu Alaikum\n";
SetConsoleTextAttribute ( m_hConsole,
BACKGROUND_RED |
BACKGROUND_GREEN |
BACKGROUND_BLUE );
std::cout << "How you doin?\n";
SetConsoleTextAttribute ( m_hConsole,
FOREGROUND_BLUE |
FOREGROUND_INTENSITY|
BACKGROUND_GREEN|
BACKGROUND_INTENSITY);
std::cout << "ABDULLA MAQSOOD\n";
SetConsoleTextAttribute(m_hConsole,GREEN+RED*16); //GRAY FC DARK_GREEN BC
std::cout << "UMT Sialkot RULES!\n";
//make our human
makeAHuman();
system("pause");
return 0;
}
void makeAHuman(){
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole,YELLOW); //can use the numbers 1 through 15
cout <<" "<<"\1"<<endl;
SetConsoleTextAttribute(hConsole,GREEN);
cout <<" "<<"/";
SetConsoleTextAttribute(hConsole,RED);
cout <<"|";
SetConsoleTextAttribute(hConsole,BLUE);
cout <<"\\"<<endl;
SetConsoleTextAttribute(hConsole,MAGENTA);
cout <<" "<<"/";
SetConsoleTextAttribute(hConsole,CYAN);
cout <<" \\";
//SetConsoleTextAttribute(hConsole,WHITE);
cout <<endl;
}
#include <iostream>
using namespace std;
//constants below make it easier to identify colors
int BLACK = 0;
int DARK_BLUE = 1;
int DARK_GREEN = 2;
int DARK_CYAN = 3;
int DARK_RED = 4;
int DARK_MAGENTA = 5;
int DARK_YELLOW = 6;
int DARK_WHITE = 7;
int GRAY = 8;
int BLUE = 9;
int GREEN = 10;
int CYAN = 11;
int RED = 12;
int MAGENTA = 13;
int YELLOW = 14;
int WHITE = 4545;
void makeAHuman();
int main( void )
{ //function Retrieves a handle to the specified standard device (standard input, standard output, or standard error).
//http://msdn.microsoft.com/en-us/library/windows/desktop/ms683231(v=vs.85).aspx
HANDLE m_hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
//Sets the attributes of characters written to the console screen buffer
//http://msdn.microsoft.com/en-us/library/windows/desktop/ms686047(v=vs.85).aspx
SetConsoleTextAttribute ( m_hConsole,
FOREGROUND_RED |
FOREGROUND_GREEN |
FOREGROUND_BLUE |
FOREGROUND_INTENSITY );
std::cout << "Assalamu Alaikum\n";
SetConsoleTextAttribute ( m_hConsole,
BACKGROUND_RED |
BACKGROUND_GREEN |
BACKGROUND_BLUE );
std::cout << "How you doin?\n";
SetConsoleTextAttribute ( m_hConsole,
FOREGROUND_BLUE |
FOREGROUND_INTENSITY|
BACKGROUND_GREEN|
BACKGROUND_INTENSITY);
std::cout << "ABDULLA MAQSOOD\n";
SetConsoleTextAttribute(m_hConsole,GREEN+RED*16); //GRAY FC DARK_GREEN BC
std::cout << "UMT Sialkot RULES!\n";
//make our human
makeAHuman();
system("pause");
return 0;
}
void makeAHuman(){
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole,YELLOW); //can use the numbers 1 through 15
cout <<" "<<"\1"<<endl;
SetConsoleTextAttribute(hConsole,GREEN);
cout <<" "<<"/";
SetConsoleTextAttribute(hConsole,RED);
cout <<"|";
SetConsoleTextAttribute(hConsole,BLUE);
cout <<"\\"<<endl;
SetConsoleTextAttribute(hConsole,MAGENTA);
cout <<" "<<"/";
SetConsoleTextAttribute(hConsole,CYAN);
cout <<" \\";
//SetConsoleTextAttribute(hConsole,WHITE);
cout <<endl;
}