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 Obscured or not.

Windows Obscured or not.

Scheduled Pinned Locked Moved C / C++ / MFC
5 Posts 3 Posters 1 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.
  • P Offline
    P Offline
    Prakash Nadar
    wrote on last edited by
    #1

    Hi, Is there a way to know if a window is completely Obscured i.e the window is "not visible" to the user but it is behind another larger application window. I am trying to do or not do something if the window is completely hidden from the user but not made invisible. Thanks in advance.

    G L 2 Replies Last reply
    0
    • P Prakash Nadar

      Hi, Is there a way to know if a window is completely Obscured i.e the window is "not visible" to the user but it is behind another larger application window. I am trying to do or not do something if the window is completely hidden from the user but not made invisible. Thanks in advance.

      G Offline
      G Offline
      Garth J Lancaster
      wrote on last edited by
      #2

      I'd have thought you would enumerate each window and look at their clipping regions - what I dont know is if you can do this in some 'order' ie from 'front' (of screen) to back or 'depth' Bizarrely enough, I was just checking out this An HTML5 Remote Desktop - Part I[^] and he starts with some routines that might interest you [edit] This may be a better way of getting all HWNDS - you'd still then have to traverse the windows represented, testing for intersections etc http://www.gettingclever.com/2008/12/list-your-hwnds.html[^] [/edit] 'g'

      modified on Tuesday, May 11, 2010 6:08 PM

      P 1 Reply Last reply
      0
      • P Prakash Nadar

        Hi, Is there a way to know if a window is completely Obscured i.e the window is "not visible" to the user but it is behind another larger application window. I am trying to do or not do something if the window is completely hidden from the user but not made invisible. Thanks in advance.

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

        Hi, The GetClipBox Function[^] will return a NULLREGION if the window is completely obscured. Unfortunately this will not work if DWM/Aero is enabled and you will probably need to calculates the intersections. http://www.codeproject.com./Messages/2812397/Re-Windows-Api-Control-Visible.aspx[^] Best Wishes, -David Delaune

        P 1 Reply Last reply
        0
        • G Garth J Lancaster

          I'd have thought you would enumerate each window and look at their clipping regions - what I dont know is if you can do this in some 'order' ie from 'front' (of screen) to back or 'depth' Bizarrely enough, I was just checking out this An HTML5 Remote Desktop - Part I[^] and he starts with some routines that might interest you [edit] This may be a better way of getting all HWNDS - you'd still then have to traverse the windows represented, testing for intersections etc http://www.gettingclever.com/2008/12/list-your-hwnds.html[^] [/edit] 'g'

          modified on Tuesday, May 11, 2010 6:08 PM

          P Offline
          P Offline
          Prakash Nadar
          wrote on last edited by
          #4

          Thanks, I will have alook, I should have specified that i was looking for a windows event something WM_blahblah.

          1 Reply Last reply
          0
          • L Lost User

            Hi, The GetClipBox Function[^] will return a NULLREGION if the window is completely obscured. Unfortunately this will not work if DWM/Aero is enabled and you will probably need to calculates the intersections. http://www.codeproject.com./Messages/2812397/Re-Windows-Api-Control-Visible.aspx[^] Best Wishes, -David Delaune

            P Offline
            P Offline
            Prakash Nadar
            wrote on last edited by
            #5

            Yeah, sounds interesting except for the caveat. I need to be make it work for all versions of 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