Показать сообщение отдельно

  #7  
Старый 14.08.2009, 21:44
Ins3t
Участник форума
Регистрация: 18.07.2009
Сообщений: 272
С нами: 8850336

Репутация: 330
По умолчанию

2Glazz, можно.
Вот простейший пример:
Код:
#include <iostream.h>
#include <stdlib.h>
#include <windows.h>
int main()
{
      HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
      for(unsigned c1=0; c1<=0xF; c1++)
        for(unsigned c2=0; c2<=0xF; c2++){
          unsigned color=c2+(c1<<4);
          SetConsoleTextAttribute(hConsole, color);
          cout<<"bgColor: "<<c1<<" textColor: "<<c2<<"      Color: "<<hex<<color<<endl;
       };
      system("PAUSE");
      return 0;
}
 
Ответить с цитированием