I start a thread in the Message Loop and then return
I'm not sure I understand. The message loop runs countless times and we don't want to start a thread in each iteration. Also what do you return from; CreateThread returns immediately.
Could you possibly post the psuedocode?