Drawing in a dialog box with MFC
Hello there
I want to draw in a dialog box, so I do the following:
Code:
void CNewPointDialog::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
COLORREF col=0x00ffffff;
//CPen pen(
CBrush brush(col), *old_brush;
CPen pen(PS_SOLID,1,col), *old_pen;
old_brush=dc.SelectObject(&brush);
old_pen=dc.SelectObject(&pen);
dc.Rectangle(83,96,100,106);
dc.SelectObject(old_brush);
}
but it doesn't work.
Can you tell me where is my mistake?