mfc画直线运行之后点鼠标左键没反映怎么回事。程序如下。用的vs2012
pen在构造函数中已初始化voidCMFCApplication5View::OnLButtonDown(UINTnFlags,CPointpoint){//TODO:在...
pen在构造函数中已初始化
void CMFCApplication5View::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
p0=point;
CView::OnLButtonDown(nFlags, point);
}
void CMFCApplication5View::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
CClientDC dc(this);
dc.SelectObject(pen);
dc.MoveTo(p0);
dc.LineTo(point);
dc.TextOutW(111,111,_T(" "));
CView::OnLButtonUp(nFlags, point);
} 展开
void CMFCApplication5View::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
p0=point;
CView::OnLButtonDown(nFlags, point);
}
void CMFCApplication5View::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
CClientDC dc(this);
dc.SelectObject(pen);
dc.MoveTo(p0);
dc.LineTo(point);
dc.TextOutW(111,111,_T(" "));
CView::OnLButtonUp(nFlags, point);
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询