双11狂欢大促

盲盒赢 定制羽绒服

开启惊喜盲盒,抽取你的专属好礼

— 惊喜奖品抢先看 —

请教OnLButtonDown后,本进程就关不了了。

robert6757 robert6757 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

void CMeasureView::OnLButtonDown(UINT nFlags, CPoint point)
{


// TODO: Add your message handler code here and/or call default
CFormView::OnLButtonDown(nFlags, point);

if(MeasuringChoose==true&&point.x>0&&point.y>0&&point.y<m_Height&&point.x<m_Width)
{
switch(MeasureType)
{
case 2:
{
ChoosePoint1x=point.x;
ChoosePoint1y=576-point.y;
CPen *oldPen ;
CPen solidPen(PS_SOLID, 0,RGB(0,255,0));
CPen pianPen(PS_SOLID, 0,RGB(255,0,0));
CPen HengPen(PS_SOLID, 0,RGB(60,60,160));
CClientDC Dc(this);

CWnd* wnd;
wnd=GetDlgItem(IDC_STATIC_DISPLAY);
CRect rect;
wnd->GetClientRect(rect);

CDC *dc=NULL;
dc=wnd->GetDC();
oldPen = dc->SelectObject (&pianPen);

dc->MoveTo(point.x,point.y-3);
dc->LineTo(point.x,point.y+3);
dc->MoveTo(point.x+3,point.y);
dc->LineTo(point.x-3,point.y);

MeasuringChoose=false;
MeasureType=0;
ReleaseDC(dc);
break;
}
default:
{
break;
}
}

}

}

谢谢各位!
...全文

相关推荐

评论 23
收藏 已收藏
分享
返回顶部
robert6757
VC/MFC 16,550 成员 421,605 内容