title: Using WriteConsoleOutputCharacter and SetConsoleTextAttribute
body: <p>I am trying to write a program that will output via coordinates. I am using the windows.h include, and the function WriteConsoleOutputCharacter to print characters to the screen, however it ignores the color set by SetConsoleTextAttribute. Any ideas how to get it to output in color?</p>
  
  <p>Code outputting to the console:</p>
  
  <pre><code>void Card::printFancy(COORD coord, bool top) const
  {
      paint();
      LPDWORD written(0);
      for (int row(0); row &lt; CARD_WIDTH; ++row)
      {
          coord.Y += 1;
          WriteConsoleOutputCharacter(Colorizer::getInstance().getCon(), _card[row], CARD_WIDTH, coord, written);
      }
      unpaint();
  }
  </code></pre>
  
  <p>And paint basically calls a paint function in my Colorizer class with the appropriate color
  Colorizer paint function (called by paint() and unpain():</p>
  
  <pre><code>void paint(uint color)
  {
      SetConsoleTextAttribute(_con, color);
  }
  </code></pre>
  
  <p><code>_con</code> is the handle, set via <code>_con = GetStdHandle(STD_OUTPUT_HANDLE);</code></p>