Quote Originally Posted by ADSOFT View Post
Code:
UINT WorkerThreadProc( LPVOID Param ){

	CFormHdrView *pCFV ;
	pCFV   = (CFormHdrView *)Param;

	if(::gpCFVw_Hdr == NULL)::AfxMessageBox("Null Pointer"); 
	...
}
Again it is wrong.
Don't pop up any window from within a worker thread! The illusion it sometimes "works" does not mean it is correct and will work for ever. Unfortunately no, it won't!