问个大家都不会的有关问题

问个大家都不会的问题
怎么把鼠标在OnMouseMove上移动画的线在OnDraw函数里显示
我试过,只能在鼠标移动的时候才能够画出流畅的线,在OnDraw里根本无法画.
我在各大论坛都问怎么画线,大家都只会回答什么在OnDraw里画,其实根本就画不了,因为OnDraw里没有鼠标检测函数,如果没有画面变动那里是死都不会出现图形的,所以你们所谓的在OnDraw里画图无非就是在OnDraw函数里写上:
pDC->MoveTo(0,0); 
pDC->LineTo(100,100);
对吧?但是这是直接贴图,和没画一样,画画就是要用鼠标来画!否则不叫画,而是叫啥来着.
谁能把具体代码贴出来.
我给50分!

------解决方案--------------------
void CMyView::OnLButtonDown(UINT nFlags, CPoint point) 
{
m_points.AddTail(new CMyPoint(point));

CView::OnLButtonDown(nFlags, point);

Invalidate();
}

void CMyView::OnMouseMove(UINT nFlags, CPoint point) 
{
if(nFlags && MK_LBUTTON) 
{
m_points.AddTail(new CMyPoint(point));
Invalidate();
}

CView::OnMouseMove(nFlags, point);
}

void CMyView::OnDraw(CDC* pDC)
{

CRect rect;
GetClientRect(&rect);

pDC->DrawEdge(rect, EDGE_ETCHED, BF_RECT);

pDC->SelectStockObject(BLACK_PEN);

BOOL first = TRUE;
POSITION pos = m_points.GetHeadPosition();
if(!pos)
{
pDC->TextOut(0,0,"Try to draw some lines !");
return;
}
while(pos != NULL) 
{
CMyPoint* p = (CMyPoint*) m_points.GetNext(pos);
if(first) { pDC->MoveTo(p->m_location); first = FALSE; }
pDC->LineTo(p->m_location);
};
}
// .h
class CMyView : public CView
{

class CMyPoint : public CObject  
{
public:
CMyPoint(CPoint location) { m_location = location; }
CPoint m_location;
};

CObList m_points;