Original Post
Language C++ Platform Win32, DirectX9c SDK I have an Error box function that I have created to replace my calls to MessageBox() to use __TIMESTAMP__, __LINE__ etc. I also have a PostQuitMessage(0); Call under certain conditions. However, the PostQuitMessage only appears to register when my program loses focus (alt+tab, minimize etc). If it hasn't lost focus it goes on a wild tangent until it does lose focus. My assumption is it's not giving enough time from the message to register. I've tried Sleep();. This call is in the render loop, in this loop it's supposed to check for an invalid RECT let the user know and Quit. Then what I described happens. Just curious as to a way to accomplish this. I have look around but every tutorial on Quitting is the standard case WM_DESTROY: PostQuitMessage(0); return 0; WinProc code.