I can't for the life of me remember what message you need to post to force an MFC application to exit. POstQuitMessage won't do, because the destructors for your doc/view stuff don't get called properly.

Orion