vc++鼠标移动
在voidCAsdView::OnMouseMove(UINTnFlags,CPointpoint){CView::OnMouseMove(nFlags,point);}...
在void CAsdView::OnMouseMove(UINT nFlags, CPoint point)
{
CView::OnMouseMove(nFlags, point);
}
实现鼠标控制矩形的移动就是
鼠标移动到哪里图形移动到哪里 展开
{
CView::OnMouseMove(nFlags, point);
}
实现鼠标控制矩形的移动就是
鼠标移动到哪里图形移动到哪里 展开
4个回答
展开全部
你说的是拉框吧
void CCh1_1View::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CClientDC dc(this);
if (m_nStep != 0)
{
dc.SetROP2(R2_NOTXORPEN);
dc.SelectStockObject(NULL_BRUSH);
if (m_Rect.right != 0)
{
dc.Rectangle(m_Rect.left, m_Rect.top, m_Rect.right, m_Rect.bottom);
}
m_Rect.right = point.x;
m_Rect.bottom = point.y;
dc.Rectangle(m_Rect.left, m_Rect.top, m_Rect.right, m_Rect.bottom);
}
CScrollView::OnMouseMove(nFlags, point);
}
void CCh1_1View::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CClientDC dc(this);
if (m_nStep != 0)
{
dc.SetROP2(R2_NOTXORPEN);
dc.SelectStockObject(NULL_BRUSH);
if (m_Rect.right != 0)
{
dc.Rectangle(m_Rect.left, m_Rect.top, m_Rect.right, m_Rect.bottom);
}
m_Rect.right = point.x;
m_Rect.bottom = point.y;
dc.Rectangle(m_Rect.left, m_Rect.top, m_Rect.right, m_Rect.bottom);
}
CScrollView::OnMouseMove(nFlags, point);
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2009-04-10
展开全部
void CAsdView::OnMouseMove(UINT nFlags, CPoint point)
{
CClientDC dc(this);
dc.Rectangle(point.x-10,point.y-10,point.x+10,point.y+10);
CView::OnMouseMove(nFlags, point);
}
如果是拉框还得用到OnLButtonDown和OnLButtonUp两个消息响应函数
{
CClientDC dc(this);
dc.Rectangle(point.x-10,point.y-10,point.x+10,point.y+10);
CView::OnMouseMove(nFlags, point);
}
如果是拉框还得用到OnLButtonDown和OnLButtonUp两个消息响应函数
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
参见CRectTracker类
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询