在头文件中定义了 HWND hwndVideo;
创建了一个线程 AfxBeginThread(videoThreadProc,m_hWnd,0);
UINT videoThreadProc(LPVOID lParam)
{ capCaptureSequence(hwndVideo);
isRecording = true;
while (!threadEnd)
;
return 0;
}但运行的时候却提示“hwndVideo' : undeclared identifier”
那么如何才能调用这个句柄?
创建了一个线程 AfxBeginThread(videoThreadProc,m_hWnd,0);
UINT videoThreadProc(LPVOID lParam)
{ capCaptureSequence(hwndVideo);
isRecording = true;
while (!threadEnd)
;
return 0;
}但运行的时候却提示“hwndVideo' : undeclared identifier”
那么如何才能调用这个句柄?
{ capCaptureSequence((HWND)lParam);
isRecording = true;
while (!threadEnd)
;
return 0;
}
extern HWND hwndVideo = XXXX;
...
UINT videoThreadProc(LPVOID lParam)
{ capCaptureSequence(hwndVideo);
isRecording = true;
while (!threadEnd)
;
return 0;
}或者用lParam将hwndVideo传过来
extern HWND hwndVideo;
extern HWND hwndVideo;或者用lParam将hwndVideo传过来