m_SendDataThread = AfxBeginThread(SendDataThreadProc,this);
UINT SendDataThreadProc(LPVOID pParam);出现的错误如下:
error C2665: 'AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'unsigned int (void *)'但是我查了msdn,没看出什么错,请指点

解决方案 »

  1.   

    SendDataThreadProc只能是类的静态成员函数或全局函数,并且在AfxBeginThread时定义必须可见。
      

  2.   

    CWinThread* AfxBeginThread( AFX_THREADPROC pfnThreadProc, LPVOID pParam, int nPriority = THREAD_PRIORITY_NORMAL, UINT nStackSize = 0, DWORD dwCreateFlags = 0, LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL );CWinThread* AfxBeginThread( CRuntimeClass* pThreadClass, int nPriority = THREAD_PRIORITY_NORMAL, UINT nStackSize = 0, DWORD dwCreateFlags = 0, LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL );