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. Shutdown message

Shutdown message

Scheduled Pinned Locked Moved C / C++ / MFC
question
10 Posts 5 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.
  • L Offline
    L Offline
    LinusWu
    wrote on last edited by
    #1

    What message can be received by window when shut down or restart a pc ? Thanks.:( Shall we be friend?

    C J 2 Replies Last reply
    0
    • L LinusWu

      What message can be received by window when shut down or restart a pc ? Thanks.:( Shall we be friend?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      WM_CLOSE Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder

      1 Reply Last reply
      0
      • L LinusWu

        What message can be received by window when shut down or restart a pc ? Thanks.:( Shall we be friend?

        J Offline
        J Offline
        Jitendra gangwar
        wrote on last edited by
        #3

        But according to the MSDN ---> System Shutdown Messages The following messages are used with system shutdown. WM_ENDSESSION WM_QUERYENDSESSION Thanks Jitendra:)

        T 1 Reply Last reply
        0
        • J Jitendra gangwar

          But according to the MSDN ---> System Shutdown Messages The following messages are used with system shutdown. WM_ENDSESSION WM_QUERYENDSESSION Thanks Jitendra:)

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

          but WM_QUERYENDSESSION is not sent by the system properly, but by an application that ask the system to shut down. then, the OS emits WM_ENDSESSION .


          TOXCCT >>> GEII power

          D 1 Reply Last reply
          0
          • T toxcct

            but WM_QUERYENDSESSION is not sent by the system properly, but by an application that ask the system to shut down. then, the OS emits WM_ENDSESSION .


            TOXCCT >>> GEII power

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            toxcct wrote: but WM_QUERYENDSESSION is not sent by the system properly, but by an application... The WM_QUERYENDSESSION message is definitely sent by the system in response to an application calling ExitWindows() or ExitWindowsEx().


            "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

            T 1 Reply Last reply
            0
            • D David Crow

              toxcct wrote: but WM_QUERYENDSESSION is not sent by the system properly, but by an application... The WM_QUERYENDSESSION message is definitely sent by the system in response to an application calling ExitWindows() or ExitWindowsEx().


              "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

              T Offline
              T Offline
              toxcct
              wrote on last edited by
              #6

              DavidCrow wrote: sent by the system in response to an application calling ExitWindows() yes, ok, but that is the same in the fact.


              TOXCCT >>> GEII power

              D 1 Reply Last reply
              0
              • T toxcct

                DavidCrow wrote: sent by the system in response to an application calling ExitWindows() yes, ok, but that is the same in the fact.


                TOXCCT >>> GEII power

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                An application calls ExitWindows[Ex](), and Windows responds by sending out a WM_QUERYENDSESSION message. How is that the same? The application did not send the message, Windows did. :confused:


                "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

                T 1 Reply Last reply
                0
                • D David Crow

                  An application calls ExitWindows[Ex](), and Windows responds by sending out a WM_QUERYENDSESSION message. How is that the same? The application did not send the message, Windows did. :confused:


                  "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

                  T Offline
                  T Offline
                  toxcct
                  wrote on last edited by
                  #8

                  damn it, you don't understand, or you don't want to understand ??????? it is the same... of course they are not the same messages. i say it is the same to what i tried to explain before. WM_QUERYENDSESSION is sent because an application asked to shut down, instead that WM_ENDSESSION is sent when windows shuts off by itself. :suss:


                  TOXCCT >>> GEII power

                  D 1 Reply Last reply
                  0
                  • T toxcct

                    damn it, you don't understand, or you don't want to understand ??????? it is the same... of course they are not the same messages. i say it is the same to what i tried to explain before. WM_QUERYENDSESSION is sent because an application asked to shut down, instead that WM_ENDSESSION is sent when windows shuts off by itself. :suss:


                    TOXCCT >>> GEII power

                    D Offline
                    D Offline
                    David Crow
                    wrote on last edited by
                    #9

                    toxcct wrote: you don't understand... I understand fully, that is why I was correcting you. In your reply to Jitendra, you stated that, "...WM_QUERYENDSESSION is not sent by the system properly, but by an application..." Are you now denying this, or are you confused by what you stated versus what you actually meant? toxcct wrote: WM_QUERYENDSESSION is sent because an application asked to shut down... This much is factual, but only if you qualify it by adding that Windows sends the message, not the application. The application "asked to shut down" by calling ExitWindows[Ex]().


                    "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

                    T 1 Reply Last reply
                    0
                    • D David Crow

                      toxcct wrote: you don't understand... I understand fully, that is why I was correcting you. In your reply to Jitendra, you stated that, "...WM_QUERYENDSESSION is not sent by the system properly, but by an application..." Are you now denying this, or are you confused by what you stated versus what you actually meant? toxcct wrote: WM_QUERYENDSESSION is sent because an application asked to shut down... This much is factual, but only if you qualify it by adding that Windows sends the message, not the application. The application "asked to shut down" by calling ExitWindows[Ex]().


                      "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

                      T Offline
                      T Offline
                      toxcct
                      wrote on last edited by
                      #10

                      yes, we're ok now. i explain myself wrongly in my first post.


                      TOXCCT >>> GEII power

                      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