线程入口函数
DWORD ThreadProc(LPVOID pParam)
{
return 1;
}
在主线程中创建子线程
void CceThread::OnBnClickedBeginThread()
{
HANDLE thHandle;
thHandle = CreateThread(NULL, 0, ThreadProc, this, 0, 0); //建立新的线程
CeSetThreadPriority(thHandle, 0); //设置线程优先级为0, 最高优先级
CeSetThreadQuantum(thHandle, 0); //线程运行中不分享时间片
}