WM_CLOSE closes all next windows
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?
All right, thank you. But how do I destroy a single window without finishing the whole thread?
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement