mfc 画折线 mousemove实时刷新的问题,我设置的点右键结束画图,但是我只有结束后才能看到线,开始看不到
voidCMyView::OnMouseMove(UINTnFlags,CPointpoint){//TODO:Addyourmessagehandlercodehere...
void CMyView::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CView::OnMouseMove(nFlags, point);
CMyDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CPoint pt;
CClientDC pdc(this);
Invalidate();
if(m_bFlag==1&&m_nPoint>0)
{
pt=pDoc->m_ptLine[m_nPoint-1];
pdc.MoveTo(pt);
pdc.LineTo(point);
}
} 展开
{
// TODO: Add your message handler code here and/or call default
CView::OnMouseMove(nFlags, point);
CMyDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CPoint pt;
CClientDC pdc(this);
Invalidate();
if(m_bFlag==1&&m_nPoint>0)
{
pt=pDoc->m_ptLine[m_nPoint-1];
pdc.MoveTo(pt);
pdc.LineTo(point);
}
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询