.h中
class CToolDlg : public CDialog
{
// Construction
public:
 DWORD WINAPI BuildFileProc(LPVOID lpParam);
 DWORD BuildFile();
........
}
 
.cpp中
void CToolDlg::OnOK() 
{
 // TODO: Add extra validation here
 HANDLE hThread = NULL;
 DWORD dwId = 0;
 hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)BuildFileProc,this,0,&dwId);
 return ;
}
 
DWORD WINAPI CToolDlg::BuildFileProc(LPVOID lpParam)
{
 CToolDlg* pThis = (CToolDlg *)lpParam;
 return pThis->BuildFile();
}
 
DWORD CToolDlg::BuildFile()
{
}
 
 
编译报错:error C2440: 'type cast' : cannot convert from '' to 'unsigned long (__stdcall *)(void *)'
        None of the functions with this name in scope match the target type
 
 
如何解决?谢谢