• Advertisement

Archived

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

Windows Message Pump Question

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

Advertisement
WM_CLOSE is called first and calls DestroyWindow() but I am unsure if WM_DESTROY will send a WM_CLOSE message (probably not would be my guess).



Qui fut tout, et qui ne fut rien
Invader''s Realm

Share this post


Link to post
Share on other sites
DefWindowProc calls DestroyWindow when it receives WM_CLOSE. You can easily override that, to popup a Yes/No message box for example. DestroyWindow sends WM_DESTROY and WM_NCDESTROY (you don''t really need that one). WM_CLOSE is sent when the close button of a window is pressed or when ALT+F4 is pressed.
Normally, you call PostQuitMessage in the WM_DESTROY handler of your main window.

----------------
Blaster
Computer game programmer and part time human being
Strategy First - http://www.strategyfirst.com
BlasterSoft - http://www.blastersoft.com

Share this post


Link to post
Share on other sites

  • Advertisement