Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

doctorsixstring

Exitting Gracefully

This topic is 5934 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

An application I am currently writing is having trouble quiting gracefully. I am using VC++ 6.0 w/ DirectX 5.0. When I close it, it either gives me an "Illegal Operation" error, or it closes the window but remains running in the background (I then have to close it with CTRL-ALT-DEL). First of all, is this right: WM_CLOSE Tells your program that the user has pressed the close window button. WM_DESTROY Tells your program to destroy its window(s). WM_QUIT Final message - finalize program termination Am I right on those messages? Also, what is the proper way to terminate an application like mine? Thanks, Mike

Share this post


Link to post
Share on other sites
Advertisement
sounds like dx might be the problem, check the sdk samples and make sure you are destroying dx at the same time they are (one project i have is destroying on a wm_quit message before it is dispatched to the window (ie i am using a peekmessage loop to processes messages). make sure that you are calling DefWndProc() for any message that you dont handle.

Share this post


Link to post
Share on other sites
Im thinking it might have to do with his main message loop. For instance, one time i was experimenting with dialog boxes and i still had my message loop in there when it wasnt needed because a different callback is used for dialogs. Try to double check your main loops.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!