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 determine if the current window is the desktop ?

How to determine if the current window is the desktop ?

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

    I only want to minimize a window if its not the desktop window (with all the icons) Maybe I can use GetForegroundWindow() somehow ? How can I do that ?

    Best Regards - Yovav Gad CEO and founder of MicroMighty, Inc.

    H 1 Reply Last reply
    0
    • Y Yovav

      I only want to minimize a window if its not the desktop window (with all the icons) Maybe I can use GetForegroundWindow() somehow ? How can I do that ?

      Best Regards - Yovav Gad CEO and founder of MicroMighty, Inc.

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      You can check return value with return value of GetDesktopWindow.

      Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

      Y 1 Reply Last reply
      0
      • H Hamid Taebi

        You can check return value with return value of GetDesktopWindow.

        Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

        Y Offline
        Y Offline
        Yovav
        wrote on last edited by
        #3

        I tried this: if (GetForegroundWindow()->m_hWnd == GetDesktopWindow()->m_hWnd) But it doesn't work

        Best Regards - Yovav Gad CEO and founder of MicroMighty, Inc.

        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