Drawing Dialog.

hi, im strating an AI program simular to "smart sweepers - v1.0" and i need to be able to draw onto a canvas.I have no idea about drawing lines or anything, that comes next. i just need to learn about setting up a section of the screen for drawing single dots on. if anyone can explain how to set up the , please help. thankyou.
[328 byte] By [John_M_Gough] at [2007-11-20 11:33:24]
# 1 Re: Drawing Dialog.
ok i didnt realise it was so easy,
first define these

HDC hDC;
PAINTSTRUCT Ps;

then where we draw

hDC = BeginPaint(hwnd, &Ps);

//these two lines draw a line on a blank window
MoveToEx(hDC, 40, 20, NULL);
LineTo(hDC, 60, 20);

EndPaint(hwnd, &Ps);
John_M_Gough at 2007-11-10 3:48:15 >