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. windows+D? Urgent please.

windows+D? Urgent please.

Scheduled Pinned Locked Moved C / C++ / MFC
question
8 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.
  • S Offline
    S Offline
    sam_psycho
    wrote on last edited by
    #1

    Which message gets processed by application when user presses "windows+d" or clicks "show desktop" icon in quick launch so application minimizes?

    C 1 Reply Last reply
    0
    • S sam_psycho

      Which message gets processed by application when user presses "windows+d" or clicks "show desktop" icon in quick launch so application minimizes?

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      Well, you get a WM_SIZE[^] message when your window gets minimized but i doubt there is a way to distinguish between the event of "show desktop" and any other cause of minimizing (like the user clicking the minimize button). Why do you have to know that?

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

      S 2 Replies Last reply
      0
      • C Code o mat

        Well, you get a WM_SIZE[^] message when your window gets minimized but i doubt there is a way to distinguish between the event of "show desktop" and any other cause of minimizing (like the user clicking the minimize button). Why do you have to know that?

        > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

        S Offline
        S Offline
        sam_psycho
        wrote on last edited by
        #3

        I have application, in custome menu I have option "minimize", by clicking on it application goes to sys tray, now menu option would be "restore" ...but that two case(mentioned in Q) option remains "minimize" as application is minimized all ready? it shud be "restore" :doh:

        C 1 Reply Last reply
        0
        • C Code o mat

          Well, you get a WM_SIZE[^] message when your window gets minimized but i doubt there is a way to distinguish between the event of "show desktop" and any other cause of minimizing (like the user clicking the minimize button). Why do you have to know that?

          > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

          S Offline
          S Offline
          sam_psycho
          wrote on last edited by
          #4

          Application does not get WM_SIZE message in both case mentioned in Q.

          C 1 Reply Last reply
          0
          • S sam_psycho

            I have application, in custome menu I have option "minimize", by clicking on it application goes to sys tray, now menu option would be "restore" ...but that two case(mentioned in Q) option remains "minimize" as application is minimized all ready? it shud be "restore" :doh:

            C Offline
            C Offline
            Code o mat
            wrote on last edited by
            #5

            Well, WM_SIZE[^] with SIZE_MINIMIZED in lParam should tell you your app got minimized and i guess SIZE_RESTORED should tell you if it got restored or SIZE_MAXIMIZED if it got maximized, but if i were you i would rather query the window'S state using GetWindowPlacement[^] and set my menu item accordingly every time the menu is shown, i think it is easier to handle than tracking some flag thoroughout the application...

            > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

            1 Reply Last reply
            0
            • S sam_psycho

              Application does not get WM_SIZE message in both case mentioned in Q.

              C Offline
              C Offline
              Code o mat
              wrote on last edited by
              #6

              Hmm, you are right, one would think it would get a WM_SIZE, same with WM_WINDOWPOSCHANGED...sorry about that...i see what else i find, if i figure out anything i will get back to you...how about GetWindowPlacement mentioned in my other[^] post?

              > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

              S 1 Reply Last reply
              0
              • C Code o mat

                Hmm, you are right, one would think it would get a WM_SIZE, same with WM_WINDOWPOSCHANGED...sorry about that...i see what else i find, if i figure out anything i will get back to you...how about GetWindowPlacement mentioned in my other[^] post?

                > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

                S Offline
                S Offline
                sam_psycho
                wrote on last edited by
                #7

                Still I'm confused, application minimizes (in both cases) but message Q does not process any message how this is possible?

                C 1 Reply Last reply
                0
                • S sam_psycho

                  Still I'm confused, application minimizes (in both cases) but message Q does not process any message how this is possible?

                  C Offline
                  C Offline
                  Code o mat
                  wrote on last edited by
                  #8

                  I have found several answers to what happens with a window when the desktop is shown, so now i am also confused: -the window gets minimized -the window gets hidden -the window gets moved to a poisition way outside of the visible area -the desktop window simply overlaps the window (so the window gets send behind the desktop) So finding out if your window is hidden or not by "show desktop" seems trickier than we thought...

                  > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

                  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