正在加载图片...
void CMy DrawView OnLButtonUp(UINT nFlags, CPoint point) if( m bLouse Down m bouse down false Release Captured ClipCursor( NULL) CClientDC dc(this) dc. SetROP2( R2 NOT) dc. Move To(m_ pt Start);∥这两行代码擦除从起点(鼠标按下点)到 dc Line to( m told);∥上次鼠标移动到的位置之间的临时线 dc. SetROP2( R2 COPYPEN dc. Move to( m pt start);∥这两行代码从起点到鼠标当前位置画线 dc Line To( point ) ∥ Set Cursor(m hArrow) ∥设置鼠标形状为标准箭头形 CView: OnLButtonUpnF lags, point)void CMyDrawView::OnLButtonUp(UINT nFlags, CPoint point) { if( m_bMouseDown ) { m_bMouseDown = false; ReleaseCapture(); ClipCursor( NULL ); CClientDC dc(this); dc.SetROP2( R2_NOT ); dc.MoveTo( m_ptStart ); //这两行代码擦除从起点(鼠标按下点)到 dc.LineTo( m_ptOld ); //上次鼠标移动到的位置之间的临时线 dc.SetROP2( R2_COPYPEN ); dc.MoveTo( m_ptStart ); //这两行代码从起点到鼠标当前位置画线 dc.LineTo( point ); // SetCursor(m_hArrow); //设置鼠标形状为标准箭头形 } CView::OnLButtonUp(nFlags, point); } 2.1
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有