|
Open thread is
AfxBeginThread (ThreadCalTem, GetSafeHwnd ());
The off thread is a global BOOL type variable, so
bThreadStop = true;
In the loop calculation of the thread,
if (bThreadStop)
break;
UINT ThreadCalTem (LPVOID pParam)
{
do
{
if (bThreadStop)
break;
.....
} while (.....)
:: PostMessage (g_HwndMain, WM_THREAD_END, 0,0);
return 0;
} |
|