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. Show Desktop

Show Desktop

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

    How do you programmatically show desktop, just like that ".scf" file(%APP_DATA%\\Microsoft\\Internet Explorer\\Show Desktop.scf) does?

    L D 2 Replies Last reply
    0
    • A Abin

      How do you programmatically show desktop, just like that ".scf" file(%APP_DATA%\\Microsoft\\Internet Explorer\\Show Desktop.scf) does?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      keybd_event(VK_LWIN, 0, 0, 0); // windows key down
      keybd_event(VK_D, 0, 0, 0);
      keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0); // windows key up

      regards

      1 Reply Last reply
      0
      • A Abin

        How do you programmatically show desktop, just like that ".scf" file(%APP_DATA%\\Microsoft\\Internet Explorer\\Show Desktop.scf) does?

        D Offline
        D Offline
        Diddy
        wrote on last edited by
        #3

        If it's to run on XP, you can Automate the shell via IShellDispatch4::ToggleDesktop - see here: http://blogs.msdn.com/robgruen/archive/2004/02/24/79294.aspx If it's not, then I think you are stuck with simulating a WIN+M key press.

        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