Ok, i am creating a user-interface thread, to accomplish that, i have a created a class that extends CWinThread, now i am using AfxBeginThread to create the thread, that works fine, except that, once i'm in the thread and do whatever i wanted to do (basically show a dialog box, do a few stuff, then kill the dialog box) i would like to end the thread, now i've tried using AfxEndThread(0) but that leads to a "Debug Assertion Failed" so i tried using PostQuitMessage(0) but that leads the WHOLE program (the thread i create AND my main thread) to close down!!!
can anyone pls tell me what i'm doing wrong here? If code is needed, pls post comment, thanks in advance
the thread is being created as such
in a function in my main thread, and it is being (trying/failing) terminated in the thread itself