Windows Obscured or not.
-
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.
-
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.
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
-
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.
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
-
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
Thanks, I will have alook, I should have specified that i was looking for a windows event something WM_blahblah.
-
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
Yeah, sounds interesting except for the caveat. I need to be make it work for all versions of Windows. :)