Th1 = CreateThread(NULL, 0, Game_Paint, this, 0, NULL);
while (Th1 == NULL)
{
Th1 = CreateThread(NULL, 0, Game_Paint, this, 0, NULL);
}
Th2 = CreateThread(NULL, 0, PlayAct, this, 0, NULL);
while (Th2 == NULL)
{
Th2 = CreateThread(NULL, 0, PlayAct, this, 0, NULL);
}
Th3 = CreateThread(NULL, 0, InitGame, this, 0, NULL);
while (Th3 == NULL)
{
Th3 = CreateThread(NULL, 0, InitGame, this, 0, NULL);
}
Th4 = CreateThread(NULL, 0, JudgeMent, this, 0, NULL);
while(Th4 == NULL)
{
Th4 = CreateThread(NULL, 0, JudgeMent, this, 0, NULL);
}
Th6 = CreateThread(NULL, 0, Texiao, this, 0, NULL);
while(Th6 == NULL)
{
Th6 =CreateThread(NULL, 0, Texiao, this, 0, NULL);
}
Th5 = CreateThread(NULL, 0, EnermyGo, this, 0, NULL);
while (Th5 == NULL)
{
Th5 = CreateThread(NULL, 0, EnermyGo, this, 0, NULL);
}
m_hThread = CreateThread(NULL, 0, EnermyAct, this, 0, NULL);
while (m_hThread == NULL)
{
m_hThread = CreateThread(NULL, 0, EnermyAct, this, 0, NULL);
}
這樣都無濟于事。。。。嗚嗚嗚
uj5u.com熱心網友回復:
CreateThread之后加個sleep(100)uj5u.com熱心網友回復:
《Windows核心編程》uj5u.com熱心網友回復:
MFC使用AfxBeginThread(Game_Paint, this) 這種執行緒開發函式好些。uj5u.com熱心網友回復:
試試這個AfxBeginThreadm_pThread= AfxBeginThread(DataRecvThreadFunc,this,THREAD_PRIORITY_NORMAL,0,0,NULL);
uj5u.com熱心網友回復:
解決了


轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/119427.html
標籤:進程/線程/DLL
上一篇:vs2015 頭檔案問題
