Advertisement
DiaxPlayer

kolory

Oct 22nd, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.13 KB | None | 0 0
  1. #include <windows.h>
  2. #include <iostream>
  3. #include <stdlib.h>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8.    
  9.     HANDLE hOut;
  10.    
  11.     hOut = GetStdHandle( STD_OUTPUT_HANDLE );
  12.     cout << "Standart" << endl << endl;
  13.     cout << "by DrraVen" << endl;
  14.     cout << "Zycze milych prac z c++" << endl;
  15.     //Standardowy ^
  16.     SetConsoleTextAttribute( hOut, BACKGROUND_RED );
  17.     cout << "Ten napis jest z cerwonycm tlem i zwykłym tekstem" << flush << endl << endl;
  18.     //Tło ^
  19.     SetConsoleTextAttribute( hOut, BACKGROUND_GREEN );
  20.     cout << "Ten napis ma zielone tlo" << flush << endl;
  21.     //Tło2 ^
  22.     SetConsoleTextAttribute( hOut, FOREGROUND_RED );
  23.     cout << "Ten napis jest czerwony bez tla" << endl;
  24.     //Napis ^
  25.     SetConsoleTextAttribute( hOut, FOREGROUND_GREEN );
  26.     cout << "Ten napis jest zielony" << endl << endl;
  27.     //Napis2 ^
  28.     SetConsoleTextAttribute( hOut, FOREGROUND_BLUE );
  29.     cout << "Ten napis jest niebieski" << endl << endl;
  30.     //Napis3 ^
  31.     SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );
  32.     cout << "Ten napis jest zielony i [i]INTENSITY[/i]" << endl;
  33.     //Intesywny ^
  34.     SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );
  35.     cout << "Ten napis jest zielony i [i]INTENSITY[/i]" << endl;
  36.     //Intesywny2 ^
  37.     SetConsoleTextAttribute( hOut, FOREGROUND_BLUE | FOREGROUND_INTENSITY );
  38.     cout << "Ten napis jest niebieski i [i]INTENSITY[/i]" << endl;
  39.     //inne kolory ^
  40.     SetConsoleTextAttribute( hOut, FOREGROUND_BLUE | FOREGROUND_RED );
  41.     cout << "Ten napis jest fioletowy'" << endl;
  42.     //inne kolory ^
  43.     SetConsoleTextAttribute( hOut, FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );
  44.     cout << "Ten napis jest fioletowy i intesywny" << endl;
  45.     //inne kolory + intesywność ^
  46.     SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_RED );
  47.     cout << "Ten napis jest [i]ala[/i] zloty " << endl;
  48.     //inne kolory2 ^
  49.     SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY );
  50.     cout << "Ten napis jest bardzije podobny do zlotego bo ma intesywnosc" << endl;
  51.     //inne kolory 2 + intesywność ^
  52.     SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
  53.     cout << "Ten napis jest seledynowy, bo jest intesywny" << endl;
  54.     //inne kolory3 + intesywność ^
  55.     SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE );
  56.     cout << "Ten napis jest matowy bo nie ma intesywnosci" << endl;
  57.     //inne kolory3 ^
  58.     SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
  59.     cout << "Mozna powiedzieć ze ten napis jest standartowy" << endl;
  60.     //inne kolory4 ^
  61.     SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );
  62.     cout << "Ten napis jest srebny bo ma intesywnosc" << endl;
  63.     //inne kolory4 + intesywność ^
  64.     // endl;
  65.     cout << "" << endl;
  66.     cout << "" << endl;
  67.     cout << "" << endl;
  68.     // endl;
  69.     SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
  70.     system( "PAUSE" );
  71.     return 0;
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement