Skip to main content
gamedev.net
🔒 Locked

error when closing

Started by Emagen Oct 29, 2000 at 2:23 PM 2 replies 400+ views
Original Post
Emagen
Emagen
Hi - I think this question was addressed, however I can''t find the post. Anyway the question is, when ever I close my directx application, I get an error. In my message procedure I have case WM_CLOSE: DestroyWindow( hwnd ); return 0; case WM_DESTROY: // clean up environment App.ReleaseDirectX(); PostQuitMessage( 0 ); return 0; I believe this is how some sample programs in the Inside Direct3D book has it. So I am not sure what is causing this error message. Thank you all your help.
Ironblayde
Ironblayde
What is the error message? And how are you returning to Windows? If you''re using return(msg.wParam) or something like that, and WM_QUIT isn''t the last message you hit before you exit the main loop and end the program, that might cause an error message to pop up when in fact you''re not doing anything wrong except returning a faulty parameter.

-Ironblayde
 Aeon Software

The following sentence is true.
The preceding sentence is false.
"Your superior intellect is no match for our puny weapons!"
Bully
Bully
And make sure you are releasing you Directx objects in the opposite order you initialized them.
" The fastest code is the code you don't call "
Emagen
Emagen
Thanks Guys

That helped a lot

I fixed the problem, I forgot the WM_QUIT

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.