Archived

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

Prevent application from exiting

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

Hey, If i click on the tiny little cross in the top section of my window, it should not exit the application. How can i do that ? I have searched the web and didnt find anything useful. I know, that WM_CLOSE is sent to the window, when i click on the "X", but it finishes anyway... THX for answers Wolf Fischer

Share this post


Link to post
Share on other sites
Well, in your winproc function under the WM_CLOSE case you should have something like PostQuitMessage(0). This tell the prog to die. If you take this out, it should not close when u tell it to. I just tested it and it works.

Share this post


Link to post
Share on other sites
No, there is nothing like that function.
Actually i am just receiving the WM_CLOSE message (and i am just showing a little message box, when the user clicks on the cross), i outcommented WM_QUIT and WM_DESTROYED.
The process keeps running, but the window is being destroyed.

Share this post


Link to post
Share on other sites