1.如果不额外开设线程,消息循环和消息处理函数在一个线程里执行
2.ExitThread介绍线程本身:
void ExitThread(DWORD dwExitCode);
Parameters:
-
dwExitCode
- [in] Exit code for the calling thread. Use the GetExitCodeThread function to retrieve a thread's exit code.
TerminateThread在线程外结束线程:
BOOL TerminateThread(HANDLE hThread,DWORD dwExitCode);
hThread :要结束的线程的句柄
dwExitCode :同上