用AfxBeginThread()创建一个子线程后,怎么得到这个子线程的返回值

解决方案 »

  1.   

    为什么不用createthread这个很好用,
      

  2.   

    Retrieving the Exit Code of a ThreadTo get the exit code of either the worker or the user-interface thread, call the ::GetExitCodeThread function. For information about this function, see the Win32 Programmer’s Reference, Volume 3. This function takes the handle to the thread (stored in the m_hThread data member of CWinThread objects) and the address of a DWORD.If the thread is still active, ::GetExitCodeThread will place STILL_ACTIVE in the supplied DWORD address; otherwise, the exit code is placed in this address.