vs2010线程求助
本人想在vs2010上编写基于对话框的视频播放器,需要用到线程,问题是所创建的线程无法调用线程函数,而在vs2008上运行则能调用线程函数,请各位大侠指点,代码如下:UINT processImages(LPVOID pParam )
{
/*CITS_Vehicle_DetectionDlg *ITSdlg = reinterpret_cast<CITS_Vehicle_DetectionDlg*>(g);*/
CITS_Vehicle_DetectionDlg *ITSdlg =(CITS_Vehicle_DetectionDlg*) pParam;
while(!ITSdlg->IsStop())
{
if(cvGrabFrame(ITSdlg->capture))
{
ITSdlg->Img = cvRetrieveFrame(ITSdlg->capture);
ITSdlg->DrawPicToHDC(ITSdlg->Img);
cvWaitKey(20);
}
}
return 0;
CITS_Vehicle_DetectionDlg* dlg = new CITS_Vehicle_DetectionDlg;
AfxBeginThread(processImages,dlg);