Here's some code my brother sent me. Look up the functions on msdn.microsoft.com to get details, but this is a "library" he uses to draw console graphics:
PT_CGUI:

T_CGUI()
{
// Init the window stuff
hConsoleOut = GetStdHandle( STD_OUTPUT_HANDLE );
hConsoleIn = GetStdHandle( STD_INPUT_HANDLE );
GetConsoleScreenBufferInfo( hConsoleOut, &csbiInfo );
// Just cause
SetConsoleMode(hConsoleIn, ENABLE_PROCESSED_INPUT | ENABLE_ECHO_INPUT | ENABLE_MOUSE_INPUT);
}
int PT_CGUI::getWidth()
{
return csbiInfo.dwSize.X;
}
int PT_CGUI::getHeight()
{
return csbiInfo.dwSize.Y;
}
void PT_CGUI::clearScreen()
{
for (int x = 0; x <= csbiInfo.dwSize.X; x++)
for (int y = 0; y <= csbiInfo.dwSize.Y; y++)
draw(x, y, ' ', 0x00);
}
int PT_CGUI::getKeyPress(bool& specialKey)
{
if (_kbhit() == 0)
return -1;
int input = _getch();
specialKey = false;
if (input == 0xE0) // Special key, like arrows
{
specialKey = true;
input = _getch();
}
return input;
}
void PT_CGUI:

raw(int x, int y, char c, WORD color)
{
COORD Coords;
DWORD Dummy;
Coords.X = x;
Coords.Y = y;
WriteConsoleOutputCharacter( hConsoleOut, &c, 1, Coords, &Dummy );
WriteConsoleOutputAttribute( hConsoleOut, &color, 1, Coords, &Dummy );
}