1.AfxBeginThread( AFX_THREADPROC pfnThreadProc, LPVOID pParam, int nPriority = THREAD_PRIORITY_NORMAL, UINT nStackSize = 0, DWORD dwCreateFlags = 0, LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL ); dwCreateFlagsSpecifies an additional flag that controls the creation of the thread. This flag can contain one of two values: CREATE_SUSPENDED Start the thread with a suspend count of one. The thread will not execute until ResumeThread is called. 0 Start the thread immediately after creation. (立即执行)2.WaitForSingleObject, WaitForMultipleObjects
创建这么多线程都需要相当长时间了AfxBeginThread创建线程的时候可以指定是否立即运行,看看MSDN上这个函数的参数吧
dwCreateFlagsSpecifies an additional flag that controls the creation of the thread. This flag can contain one of two values: CREATE_SUSPENDED Start the thread with a suspend count of one. The thread will not execute until ResumeThread is called.
0 Start the thread immediately after creation. (立即执行)2.WaitForSingleObject, WaitForMultipleObjects
我这个肯定要搞并行处理的。
to:Seu_why
我试试