Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to control windows shutdown?

how to control windows shutdown?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    ThinkingPrometheus
    wrote on last edited by
    #1

    hiho@ll i just wanted to know if it's possible to "hook" the windows shutdown and if yes how? i thought about a simple alarm prog, which does something if you want to shutdown windows for example it checks if you did some task before shutdown or it simply reminds you to do something before shuting down anybody has an idea? thx@ll

    T 1 Reply Last reply
    0
    • T ThinkingPrometheus

      hiho@ll i just wanted to know if it's possible to "hook" the windows shutdown and if yes how? i thought about a simple alarm prog, which does something if you want to shutdown windows for example it checks if you did some task before shutdown or it simply reminds you to do something before shuting down anybody has an idea? thx@ll

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      ThinkingPrometheus wrote: i thought about a simple alarm prog, which does something if you want to shutdown windows HANDLE WM_QUERYENDSESSION message !

      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      cheers, Alok Gupta VC Forum Q&A :- I/ IV

      T 1 Reply Last reply
      0
      • T ThatsAlok

        ThinkingPrometheus wrote: i thought about a simple alarm prog, which does something if you want to shutdown windows HANDLE WM_QUERYENDSESSION message !

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta VC Forum Q&A :- I/ IV

        T Offline
        T Offline
        ThinkingPrometheus
        wrote on last edited by
        #3

        maybe i'm wrong but if i handle such an event, windows will try to kill the application if it doesn't exit!? so is it possible to abort the shutdown if i use WM_QUERYENDSESSION?

        T 1 Reply Last reply
        0
        • T ThinkingPrometheus

          maybe i'm wrong but if i handle such an event, windows will try to kill the application if it doesn't exit!? so is it possible to abort the shutdown if i use WM_QUERYENDSESSION?

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          ThinkingPrometheus wrote: so is it possible to abort the shutdown if i use WM_QUERYENDSESSION? Yeap it possible, you just return the FALSE o this event and then you have to shutdown by your self!

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta VC Forum Q&A :- I/ IV

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups