It seems that the "WM_CLOSE" is very much analogus to Java''s "windowClosed event", so if you are trying to catch this event, with the reasoning that if you clicked on the application window''s exit button to generate the event (WM_CLOSE/windowClosed), you would have already exited that window(i.e that window has been destoryed), and no more events can be listened to or processed. Do you follow me ...
The point is there exist in Java and hopefully(logically) in Win32 another event analogus to Java''s "windowClosing" event which is trigged while in the process of shutting down a window, which allows you to catch it before the destruction of that window. Do you still follow me ...
The question now is "what then is the point of "WM_CLOSE" or "windowClosed" events?", and the answer is "think child windows"; example?, MS Word with mutiple Word docs opened, destorying one of the currently opened Word document does not destory the main application, does it now?. The point is killing the child component(the Word docs) does not kill the main container(the Word app).
The implications is of course obvious, e.g you want to notify your container that one of your components in the container has been destoryed/quitted from etc...
I hope this has helped :>, try finding that WM_ analogus to windowClosing event.
It seems that the "WM_CLOSE" is very much analogus to Java''s "windowClosed event", so if you are trying to catch this event, with the reasoning that if you clicked on the application window''s exit button to generate the event (WM_CLOSE/windowClosed), you would have already exited that window(i.e that window has been destoryed), and no more events can be listened to or processed. Do you follow me ...
The point is there exist in Java and hopefully(logically) in Win32 another event analogus to Java''s "windowClosing" event which is trigged while in the process of shutting down a window, which allows you to catch it before the destruction of that window. Do you still follow me ...
The question now is "what then is the point of "WM_CLOSE" or "windowClosed" events?", and the answer is "think child windows"; example?, MS Word with mutiple Word docs opened, destorying one of the currently opened Word document does not destory the main application, does it now?. The point is killing the child component(the Word docs) does not kill the main container(the Word app).
The implications is of course obvious, e.g you want to notify your container that one of your components in the container has been destoryed/quitted from etc...
I hope this has helped :>, try finding that WM_ analogus to windowClosing event.
That''s true... There are probably dozens of window-closing messages I could be trapping, but the problem I''m having is that some messages aren''t being caught while others are. Like I''ve said in a few posts on this thread, I used to have this set up so that all message logic was performed inside the designated windows procedure, and it caught WM_CLOSE just fine... But now it''s not finding it. WM_CLOSE is good enough for what I''m doing if I can just manage to catch the damn thing!