主要函数如下:
void CDraw4View::OnLButtonDown(UINT nFlags, CPoint point) 
{
// TODO: Add your message handler code here and/or call default
originPoint=point;
CView::OnLButtonDown(nFlags, point);
}void CDraw4View::OnLButtonUp(UINT nFlags, CPoint point) 
{
// TODO: Add your message handler code here and/or call default
endPoint=point;
     CClientDC dc(GetParent());
dc.MoveTo(originPoint);
dc.LineTo(endPoint);
CView::OnLButtonUp(nFlags, point);
}
运行后,仍然只能在编辑框内画线,可是我明明用了GetParent()啊?还有一个问题:
msdn中关于 GetParent()定义如下:HWND GetParent( 
  HWND hWnd 
);中间应该有一个参数的啊,为什么编译的时候VC提示GetParent是无参函数呢?
我真的很想用CClientDC dc(GetParent(this));
//其中this是CView类的指针谢谢