// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <windows.h>
#include <iostream>

int main(void)
{
  HANDLE con = GetStdHandle(STD_OUTPUT_HANDLE);
  SetConsoleTextAttribute(con, FOREGROUND_GREEN | FOREGROUND_INTENSITY | BACKGROUND_RED);
  std::cout << "Green on red\n";
  SetConsoleTextAttribute(con, FOREGROUND_RED | FOREGROUND_INTENSITY | BACKGROUND_BLUE);
  std::cout << "Red on blue\n";
  SetConsoleTextAttribute(con, FOREGROUND_BLUE | FOREGROUND_INTENSITY | BACKGROUND_GREEN);
  std::cout << "Blue on green\n";
  SetConsoleTextAttribute(con, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
  return 0;
}
