quote:
Originally posted by Jesus
Well the message to be cancelled is WM_DESTROY
You probably want to cancel WM_CLOSE and not WM_DESTROY
Because WM_CLOSE is the message that is sent to a window to tell it to start closeing, and this lets the window clean up and do anything it needs todo when its closed (for example in a group conversation it shows the prompt dialog when you send WM_CLOSE).
However WM_DESTROY is what is sent when the window actually needs to be destroyed, usually after WM_CLOSE has been sent, and the window has had time to clean up.
So if you only canceled WM_DESTROY then the window would still do all the closeing it needs todo (like ending sessions) but the window would just never get destroyed. So you need to possible cancel both.
Hope this makes some sense