hkullana
July 3rd, 2007, 07:05 AM
hi,
when i compile the below code in mfc:
CWinThread *thread;
thread = AfxBeginThread(thethread,this);
it is working nice.
But when i compile it in the console the thread function works only one time.
It needs the below line at the end:
WaitForSingleObject(GetCurrentThread(), INFINITE);
Why there such a difference ?
when i compile the below code in mfc:
CWinThread *thread;
thread = AfxBeginThread(thethread,this);
it is working nice.
But when i compile it in the console the thread function works only one time.
It needs the below line at the end:
WaitForSingleObject(GetCurrentThread(), INFINITE);
Why there such a difference ?