vc mfc窗口图形的重画问题。写了个绘图函数。在鼠标双击响加入了此函数,想双击后先清除以前画的,重画
voidCCwmfcView::OnLButtonDblClk(UINTnFlags,CPointpoint){//TODO:Addyourmessagehandlerc...
void CCwmfcView::OnLButtonDblClk(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
//if((point.x+30)>0)
//300 300做原点
if(tag==0)
{
XL=point.x-100;
YH=-(50-point.y);
R=4;
Times=5;
//Invalidate();
DrawMap(R,XL,YH,Times);
tag=1;
}
else
{
XL=0;
YH=0;
R=2;
Times=1;
//Invalidate();
DrawMap(R,XL,YH,Times);
tag=0;
}
Invalidate(false);
CView::OnLButtonDblClk(nFlags, point);
} 展开
{
// TODO: Add your message handler code here and/or call default
//if((point.x+30)>0)
//300 300做原点
if(tag==0)
{
XL=point.x-100;
YH=-(50-point.y);
R=4;
Times=5;
//Invalidate();
DrawMap(R,XL,YH,Times);
tag=1;
}
else
{
XL=0;
YH=0;
R=2;
Times=1;
//Invalidate();
DrawMap(R,XL,YH,Times);
tag=0;
}
Invalidate(false);
CView::OnLButtonDblClk(nFlags, point);
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询