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 detect a laptop lid is closed?

How to detect a laptop lid is closed?

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

    Hello Friends I have a MFC application and in which I want to show some message when user tries to close the lid of the laptop. Is there a way or event through which i can get when used closed lid of laptop. Also I want to get notification when user presses Ctr+Alt+Del and logs into Laptop after he closed the lid of the laptop. Is there any way to do this ? Regards Mahesh

    V F M 3 Replies Last reply
    0
    • A Amarelia

      Hello Friends I have a MFC application and in which I want to show some message when user tries to close the lid of the laptop. Is there a way or event through which i can get when used closed lid of laptop. Also I want to get notification when user presses Ctr+Alt+Del and logs into Laptop after he closed the lid of the laptop. Is there any way to do this ? Regards Mahesh

      V Offline
      V Offline
      Vipin Aravind
      wrote on last edited by
      #2

      For Ctr+Alt+Del , you have to write GINA. There is a sample in platform sdk. Alternatively you can create a registry value DisableCAD under Winlogon key to disable the ctrl-alt-del. Vipin - MVP

      A 1 Reply Last reply
      0
      • V Vipin Aravind

        For Ctr+Alt+Del , you have to write GINA. There is a sample in platform sdk. Alternatively you can create a registry value DisableCAD under Winlogon key to disable the ctrl-alt-del. Vipin - MVP

        A Offline
        A Offline
        Amarelia
        wrote on last edited by
        #3

        Thankx for finding time I do not want to disable CtrlAltDel menu. I just want a notification when this happens Mahesh

        1 Reply Last reply
        0
        • A Amarelia

          Hello Friends I have a MFC application and in which I want to show some message when user tries to close the lid of the laptop. Is there a way or event through which i can get when used closed lid of laptop. Also I want to get notification when user presses Ctr+Alt+Del and logs into Laptop after he closed the lid of the laptop. Is there any way to do this ? Regards Mahesh

          F Offline
          F Offline
          FarPointer
          wrote on last edited by
          #4

          HI , Check this out http://www.codeproject.com/win32/AntonioWinLock.asp[^] Regards FarPointer.

          1 Reply Last reply
          0
          • A Amarelia

            Hello Friends I have a MFC application and in which I want to show some message when user tries to close the lid of the laptop. Is there a way or event through which i can get when used closed lid of laptop. Also I want to get notification when user presses Ctr+Alt+Del and logs into Laptop after he closed the lid of the laptop. Is there any way to do this ? Regards Mahesh

            M Offline
            M Offline
            Michael Dunn
            wrote on last edited by
            #5

            How is the user going to see your message if the lid is closed? :confused: --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Shots do not hurt other players... yet

            M R G A 4 Replies Last reply
            0
            • M Michael Dunn

              How is the user going to see your message if the lid is closed? :confused: --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Shots do not hurt other players... yet

              M Offline
              M Offline
              Maximilien
              wrote on last edited by
              #6

              :laugh:


              Maximilien Lincourt Your Head A Splode - Strong Bad

              1 Reply Last reply
              0
              • M Michael Dunn

                How is the user going to see your message if the lid is closed? :confused: --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Shots do not hurt other players... yet

                R Offline
                R Offline
                Rage
                wrote on last edited by
                #7

                Michael Dunn wrote:

                How is the user going to see your message if the lid is closed?

                The message is suppose to warn the user that he will not be able to see a message if the lid is closed :rolleyes: ~RaGE();

                1 Reply Last reply
                0
                • M Michael Dunn

                  How is the user going to see your message if the lid is closed? :confused: --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Shots do not hurt other players... yet

                  G Offline
                  G Offline
                  Gary R Wheeler
                  wrote on last edited by
                  #8

                  Beat me to it :laugh:.


                  Software Zen: delete this;

                  Fold With Us![^]

                  1 Reply Last reply
                  0
                  • M Michael Dunn

                    How is the user going to see your message if the lid is closed? :confused: --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Shots do not hurt other players... yet

                    A Offline
                    A Offline
                    Amarelia
                    wrote on last edited by
                    #9

                    Hi Dear YOu are right... But what I mean to say is that I have to do some background processing while that lid gets closed. Thats the reason I need it. Is there any answer ? Regards, Mahesh Mahesh

                    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