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. WM_CLOSE to Desktop

WM_CLOSE to Desktop

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

    I get the "Shut down windows" dialog when I press Alt+F4 on the desktop, with all the other application windows minimized. To do this programmatically, which window is this that I should send WM_CLOSE to? thanks!

    O 2 Replies Last reply
    0
    • C Chintoo723

      I get the "Shut down windows" dialog when I press Alt+F4 on the desktop, with all the other application windows minimized. To do this programmatically, which window is this that I should send WM_CLOSE to? thanks!

      O Offline
      O Offline
      Owner drawn
      wrote on last edited by
      #2

      I think it should be "Progman".

      Jesus Lives Forever - Amen:rose:

      --Owner drawn:rose: --An eye for an eye makes the whole world blind. --If you find my post helpful then do rate it. --Jesus is Lord:rose:

      P 1 Reply Last reply
      0
      • C Chintoo723

        I get the "Shut down windows" dialog when I press Alt+F4 on the desktop, with all the other application windows minimized. To do this programmatically, which window is this that I should send WM_CLOSE to? thanks!

        O Offline
        O Offline
        Owner drawn
        wrote on last edited by
        #3

        Yeah this works...

        HWND hprg = ::FindWindow(_T("Progman"), NULL);
        ::SendMessage(hprg, WM_CLOSE, 0,0);
        

        Jesus Lives Forever - Amen:rose:

        --Owner drawn:rose: --An eye for an eye makes the whole world blind. --If you find my post helpful then do rate it. --Jesus is Lord:rose:

        C 1 Reply Last reply
        0
        • O Owner drawn

          Yeah this works...

          HWND hprg = ::FindWindow(_T("Progman"), NULL);
          ::SendMessage(hprg, WM_CLOSE, 0,0);
          

          Jesus Lives Forever - Amen:rose:

          --Owner drawn:rose: --An eye for an eye makes the whole world blind. --If you find my post helpful then do rate it. --Jesus is Lord:rose:

          C Offline
          C Offline
          Chintoo723
          wrote on last edited by
          #4

          Yeah it works. thank you. Just curious, how do I press OK or Cancel on that dialog box programmatically? thanks!

          O 1 Reply Last reply
          0
          • C Chintoo723

            Yeah it works. thank you. Just curious, how do I press OK or Cancel on that dialog box programmatically? thanks!

            O Offline
            O Offline
            Owner drawn
            wrote on last edited by
            #5

            You can use spy++ to find that out.

            Jesus Lives Forever - Amen:rose:

            --Owner drawn:rose: --An eye for an eye makes the whole world blind. --If you find my post helpful then do rate it. --Jesus is Lord:rose:

            1 Reply Last reply
            0
            • O Owner drawn

              I think it should be "Progman".

              Jesus Lives Forever - Amen:rose:

              --Owner drawn:rose: --An eye for an eye makes the whole world blind. --If you find my post helpful then do rate it. --Jesus is Lord:rose:

              P Offline
              P Offline
              Prakash Nadar
              wrote on last edited by
              #6

              progman is no more the shell its just an app now ;)

              O 1 Reply Last reply
              0
              • P Prakash Nadar

                progman is no more the shell its just an app now ;)

                O Offline
                O Offline
                Owner drawn
                wrote on last edited by
                #7

                Yeah you are right prakash. But still that is what he asked for.


                Owner drawn Jesus Loves

                P 1 Reply Last reply
                0
                • O Owner drawn

                  Yeah you are right prakash. But still that is what he asked for.


                  Owner drawn Jesus Loves

                  P Offline
                  P Offline
                  Prakash Nadar
                  wrote on last edited by
                  #8

                  humm yeah, didnt realise that progman is still there as a window. may be it is there for some compatiblity issues. Someone rated u down :) i will offset that.

                  O 1 Reply Last reply
                  0
                  • P Prakash Nadar

                    humm yeah, didnt realise that progman is still there as a window. may be it is there for some compatiblity issues. Someone rated u down :) i will offset that.

                    O Offline
                    O Offline
                    Owner drawn
                    wrote on last edited by
                    #9

                    Mr.Prakash wrote:

                    that progman is still there as a window. may be it is there for some compatiblity issues.

                    Yeah it acts as the parent for the desktop.


                    Owner drawn Jesus Loves

                    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