title: How do I add an event handler for when a thread finishes in MFC?
body: <p>At the moment, I am using <code>WaitForSingleObject</code> to wait for a sub-task thread to complete. Unfortunately, this causes my GUI to lock up. What I would like to do instead, is set a handler (in the GUI thread) that will be called after the sub-task thread is complete. Is there another function for this?</p>