ok here's the situation

- i made a program that spawns a worker type thread ( thread A)
This thread sprawns 20 child worker threads (thread A_1, thread A_2 ...)
- thread A dies only after all the 20 child threads have returned
- Before all the threads return, the main user interface thread returns so that the prog is still responsive to the user.

the threads spawn as they should and according th VC++ debugger, they die properly when the child threads returns
Code:
The thread 0xFFF950A5 has exited with code 202 (0xCA).
The thread 0xFFF95485 has exited with code 202 (0xCA).
The thread 0xFFFA8865 has exited with code 202 (0xCA).
The thread 0xFFF96F81 has exited with code 202 (0xCA).
The thread 0xFFFAD82D has exited with code 202 (0xCA).
The thread 0xFFF8BDA9 has exited with code 202 (0xCA).
The thread 0xFFF90001 has exited with code 202 (0xCA).
The thread 0xFFF8D5C5 has exited with code 202 (0xCA).
The thread 0xFFF949FD has exited with code 202 (0xCA).
The thread 0xFFF94441 has exited with code 202 (0xCA).
The thread 0xFFF8B1C5 has exited with code 202 (0xCA).
The thread 0xFFFABD21 has exited with code 202 (0xCA).
The thread 0xFFF89D69 has exited with code 202 (0xCA).
The thread 0xFFF971F1 has exited with code 202 (0xCA).
The thread 0xFFF80095 has exited with code 202 (0xCA).
The thread 0xFFFECBAD has exited with code 202 (0xCA).
The thread 0xFFF95BF1 has exited with code 202 (0xCA).
The thread 0xFFFC1E59 has exited with code 202 (0xCA).
The thread 0xFFFFE325 has exited with code 202 (0xCA).
The thread 0xFFF98609 has exited with code 202 (0xCA).
The thread 0xFFF9BF8D has exited with code 202 (0xCA).
The thread 0xFFF972A9 has exited with code 1 (0x1).  <== thread A
however i ran another program ( Iarsn TaskInfo2003 from download.com) to check out if the threads have died and HORRORS OF HORRORS!!

they were still alive, increasing in Arimetic progression everytime i press the button. Hence the more i use the program, the more UNDEAD threads there are hogging system resources.
So... how do i solve this stubbon problem??

- terminatethread isnt that elegant coz it doesnt flush everything out
- closehandle??
- exitthread?? I thought the child threads returns it's remaments memory is cleaned up cleaner than using exitthread?


I am using
- win98SE
- VC++ 6.0
- API style of coding, dunnno anything about MFC.(learning the basic API before going to MFC)