Can anybody help me to understand How terminate a worker thread created with AfxBeginThread(..) function in MFC application.
I mean to terminate worker thread from original thread.
From within the thread, call AfxEndThread() or simply return from the worker thread start function.
To properly terminate a thread from another thread, you must signal or otherwise communicate to the thread that you want it to terminate and then it should terminate itself. Use one of the many multithreading techniques for signaling or data sharing/locking.