Results 1 to 2 of 2

Thread: prevent windows shutdown

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Lost in the Mojave Desert
    Posts
    82
    anyone know how to intercept windows shutdown message and discard it b4 windows shuts down in other words prevent or delay windows shutdown?
    Don't go away mad, just go away.

    Bam-Bam

  2. #2
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    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.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width