anyone know how to intercept windows shutdown message and discard it b4 windows shuts down in other words prevent or delay windows shutdown?
Printable View
anyone know how to intercept windows shutdown message and discard it b4 windows shuts down in other words prevent or delay windows shutdown?
you can't prevent it. You can temporarily delay it by subclassing your own program's message handler and detecting wm_destroy and wm_close messages and not passing them on.
However, your program can still be forced to close because eventually the dialog box "program is not responding" with the "close" and "wait" buttons will pop up.