I would like to know how you can react to the closing of a window; when the closing is not done directly (using the 'x' button), but because the application shuts down (or any other reason). 

I have the impression that, in the case of an application shutdown, windows do not send a SEL_CLOSE.

Best regards

Frank De prins