鼠标消息跨窗口_yuan1988219_新浪博客

void CVideoDlg::OnMouseMove(UINT nFlags, CPoint point)
{
if(m_bBeginDrag)
{
CPoint pt(point);
ClientToScreen(&pt);
CWnd *pDWnd = WindowFromPoint(pt);
if(pDWnd!= NULL)
{
if(pDWnd->IsKindOf(RUNTIME_CLASS (CDrawChannel)))
{
pDropWnd = pDWnd;
MapWindowPoints(FromHandle(((CDrawChannel*)pDropWnd)->m_hWnd),&point,1);
if (((CDrawChannel*)pDropWnd)->m_rcChannel.PtInRect(point))
{
m_bPointIn = true;
SetCursor(LoadCursor(NULL, IDC_HAND));
}
else
{
SetCursor(LoadCursor(NULL, IDC_NO));
m_bPointIn = false;
}
m_tgVideoInfo.strPicPath = m_strPath;
bool bSearch = SearchVideo(m_strPath,m_strName+_T(".")+m_strType,m_tgVideoInfo.strVideoPath,m_tgVideoInfo.strVideoName,m_tgVideoInfo.nFrame,m_tgVideoInfo.lFrameRate);
if (!bSearch)
{
MessageBox(_T("无相关视频"));
return;
}
((CDrawChannel*)pDropWnd)->SetColorBar(m_tgVideoInfo, point, true, m_bPointIn);//设置图片
}
else
{
SetCursor(LoadCursor(NULL, IDC_NO));
m_bPointIn = false;
}
}
}

CDialogEx::OnMouseMove(nFlags, point);
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值