How to draw lines in a Dialog Box using MFC
Hi,
How to draw lines or any other on a Dialog Box.
I want to draw lines when I move my mouse...
How can I do it.. I am Using VC++ 6.0.
I have already tried using .. But no good..
Help me out....
Code:
void CPaintBDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
static CPoint p;
CPaintDC dc(this);
CPen * myPen = new CPen(PS_SOLID,2,RGB(255,0,0));
dc.SelectObject(myPen);
dc.MoveTo(p.x,p.y);
dc.LineTo(point.x,point.y);
p.x=point.x;
p.y=point.y;
delete myPen;
CDialog::OnLButtonDown(nFlags, point);
}