接口AfxBeginThread
CWinThread* AfxBeginThread( AFX_THREADPROC pfnThreadProc, LPVOID pParam, int nPriority = THREAD_PRIORITY_NORMAL, UINT nStackSize = 0, DWORD dwCreateFlags = 0, LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL );Tips:1 创建线程缺省情况下,创建线程执行线程任务,任务完成后,创建线程的资源句柄CWinthread资源均会被释放。2 不需要调用CloseHandle CWinthread->m_hThread,也不需要delete CWinthread*,否则会出现异常