void CDrawView::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default //First in the method: /* HDC hdc;
hdc=::GetDC(m_hWnd);
MoveToEx(hdc,m_ptOrigin.x,m_ptOrigin.y,NULL);
LineTo(hdc,point.x,point.y);
::ReleaseDC(m_hWnd,hdc);*/ //The second method: /*CDC *pDC=GetDC();
pDC->MoveTo(m_ptOrigin);
pDC->LineTo (point);
ReleaseDC(pDC);*/ //The third in the method
    /*CClientDC dc(this);
//CClientDC dc(GetParent());
dc.MoveTo (m_ptOrigin);
dc.LineTo (point);*/    //Fourth in the method
   /* //CWindowDC dc(GetParent());
    CWindowDC dc(GetDesktopWindow());
    //CWindowDC dc(this);
dc.MoveTo (m_ptOrigin);
dc.LineTo (point);*/

//Fifth in the method

CPen pen(PS_SOLID,2,RGB(255,0,0));
CClientDC dc(this);
Cpen *pOldPen=dc.SelectObject (&pen);
   
dc.MoveTo (m_ptOrigin);
dc.LineTo (point);
           dc.SelectObject (pOldPen);
CView::OnLButtonUp(nFlags, point);}
错误如下:
1>.\DrawView.cpp(148) : error C2065: 'Cpen' : undeclared identifier
1>.\DrawView.cpp(148) : error C2065: 'pOldPen' : undeclared identifier
1>.\DrawView.cpp(152) : error C2065: 'pOldPen' : undeclared identifier
希望高手指点,vs2008环境vc++