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. Enumerating windows on desktop (VC++)

Enumerating windows on desktop (VC++)

Scheduled Pinned Locked Moved C / C++ / MFC
c++jsonquestion
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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hi, I want to list out the captions of all open windows on desktop (the items which all are shown on task bar). I tried using 'EnumDesktopWindows' function but it provides too many unnecessary window handles. Can we filter the actual windows from the list provided by above API?

    Regards, Krishnakumar T. G.

    D 1 Reply Last reply
    0
    • L Lost User

      Hi, I want to list out the captions of all open windows on desktop (the items which all are shown on task bar). I tried using 'EnumDesktopWindows' function but it provides too many unnecessary window handles. Can we filter the actual windows from the list provided by above API?

      Regards, Krishnakumar T. G.

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Krishnakumartg wrote:

      Can we filter the actual windows from the list provided by above API?

      For each window handle, check to see if it has a captain, and if it is visible. That should narrow it down.

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

      L 1 Reply Last reply
      0
      • D David Crow

        Krishnakumartg wrote:

        Can we filter the actual windows from the list provided by above API?

        For each window handle, check to see if it has a captain, and if it is visible. That should narrow it down.

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

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

        Thanks. It worked with some hard coded exclusions like "Start", "Program manager" windows.

        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