应该是下面代码的问题,我删除后,可以正常运行。
void CCaptureDlg::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos)
{
CDialog::OnWindowPosChanged(lpwndpos);
for (UINT i = 0 ; i< m_DevNum; i++)
{
if (m_Frame.m_pList[i].m_ShowImage)
{
if (m_Frame.m_pList[i].m_Stop==psStop)
{
VCAStopVideoPreview(i);
VCAUpdateOverlayWnd(m_Frame.GetSafeHwnd());
}
else if (m_Frame.m_pList[i].m_Stop==psPreview)
{
m_Frame.m_pList[i].Invalidate();
VCAUpdateOverlayWnd(m_Frame.m_hWnd);
VCAUpdateVideoPreview(i,m_Frame.m_pList[i].m_hWnd);
}
}
}
}
而且与
VCAStopVideoPreview(i);
VCAUpdateOverlayWnd(m_Frame.GetSafeHwnd());
这两个监控函数无关,与m_Frame有关。