Jump to content
  • Advertisement
Sign in to follow this  
andrew1b

WM_CLOSE closes all next windows

This topic is 3629 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

Hello, I'm making a program wich first creates a window that allows the user to choose a screen resolution, after something is chosen the window should automaticaly close and then the program creates another window (both with ordinary CreateWindow functions). The problem is, if I try to close the first window by sending the WM_CLOSE message (and then PostQuitMessage) it would close the second window just after it shows up. Any of these windows are parent or child, they should't have anything to do wich each other. Why does it happen?

Share this post


Link to post
Share on other sites
Advertisement
Call DestroyWindow in response to WM_CLOSE. If you need to, you can perform document-related cleanup or prompt the user to save, etc. You can also delay some activity to your WM_DESTROY handler.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!