What is the best way to draw things in the Console Window on the Win 32 platform using C++?
I know that you can draw simple art using symbols bu
#include
#include
int main()
{
// Get window handle to console, and device context
HWND console_handle = GetConsoleWindow();
HDC device_context = GetDC(console_handle);
//Here's a 5 pixels wide RED line [from initial 0,0] to 300,300
HPEN pen =CreatePen(PS_SOLID,5,RGB(255,0,0));
SelectObject(device_context,pen);
LineTo(device_context,300, 300);
ReleaseDC(console_handle, device_context);
cin.ignore();
return 0;
}