【发布时间】:2010-11-10 12:58:05
【问题描述】:
我在 WinMain 中创建了一个线程,然后我有一个经典的 msg 循环:
while(GetMessage(&msg, NULL, 0, 0))
{
if (!done){
GetExitCodeThread(dThread,&dwCode);
if (dwCode!=STILL_ACTIVE){
//thread done
}
}
if (!IsDialogMessage (UWnd, & msg))
{
TranslateMessage ( & msg );
DispatchMessage ( & msg );
}
}
这可以正常工作,但如果线程完成,它不会触发,直到窗口上的某些操作完成(鼠标、焦点等)。收到消息或线程结束时如何触发循环?
谢谢...
【问题讨论】: