Wednesday, November 4, 2009

Line Draw Program OnMouseMove_Evet

void CMouse_Move_EventView::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
//start=point;
if(i==0)
{
start=point;
}
else
{
CClientDC *kBC = new CClientDC(this);
kBC->MoveTo (start);
kBC->LineTo (point.x,point.y);
start=point;
}
i++;


CView::OnMouseMove(nFlags, point);
}

void CMouse_Move_EventView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
/*start=point;

CClientDC *kBC = new CClientDC(this);
kBC->MoveTo (start);
kBC->LineTo (point.x,point.y);*/
CView::OnLButtonDown(nFlags, point);
}

No comments:

Post a Comment