void CCSSCDlg::OnButton2()
{

datasocket=accept(s_consocket,0,0);
HANDLE threadid;
threadid=CreateThread(0,0,RecvThread,&datasocket,0,0);
// CWinThread* pThread=AfxBeginThread(0,RecvThread,GetSafeHwnd(),NULL);//MessageBox("hello",NULL,MB_OK);
}
UINT CCSSCDlg::RecvThread(LPVOID lpParam)
{
return 0;
}
上面代码是我的单文档程序中一个按钮的代码,但编译的时候报错:
D:\MyProjects\CSSC\CSSCDlg.cpp(211) : error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned int (void *)' to 'unsigned long (__stdcall *)(void *)'
        None of the functions with this name in scope match the target type
Error executing cl.exe.
为什么呢?
怎么样才能实现我这样的功能呢?(刚刚起步,还不会用MFC,也不会用那个专门的线程类,如果可以,也希望讲解一下用MFC的线程类的用法,谢谢)