CClientDC dc(this);ppenOld=dc.SelectObject(&penNew); 这个东东要放这里 。做成类的变量就行啦 m_penNew dc.MoveTo(m_pt); dc.LineTo(point); m_pt=point;