通过AfxBeginThread创建了一个线程 里面第五个参数用了CREATE_SUSPENDED 就是创造好了就挂起这个线程 那如何激活这个线程呢 让这个线程开始被调度 有什么函数 全局函数和CWinTread中封装的激活函数都能给我介绍下吗 谢谢高手们

解决方案 »

  1.   

    ResumeThread
    The ResumeThread function decrements a thread's suspend count. When the suspend count is decremented to zero, the execution of the thread is resumed. DWORD ResumeThread(
      HANDLE hThread   // identifies thread to restart
    );CWinThread::ResumeThread
      

  2.   

    大哥,ResumeThread(HANDLE handle);
      

  3.   

    AfxBeginThread 创建的时候保存线程句柄 ResumeThread(hThread) 
      

  4.   

    CWinThread *pThread = AfxBeginThread(ThreadFunc,NULL);
    pThread->ResumeThread(); //激活线程
      

  5.   

    都是用ResumeThread,API和CWinThread类里面都有这个函数。