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);
}