- How to tell if window is truely visible?
- Posted by ajcrm125 on September 21st, 2006
I tried the IsWindowVisible() function but it doesn't seem to be doing
anything at all.... always returns non 0 even when I have tons of other
windows on top of my app.
???
-Adam
- Posted by [jongware] on September 21st, 2006
"ajcrm125" <ajcrm125@gmail.com> wrote in message
news:1158856070.399251.82900@i3g2000cwc.googlegrou ps.com...
"Because the return value specifies whether the window has the WS_VISIBLE
style, it may be nonzero even if the window is totally obscured by other
windows."
MSDN.
[Jongware]
- Posted by ajcrm125 on September 21st, 2006
Hence my question... how can I tell if a window is truly visable?
Thanks,
-Adam
[jongware] wrote:
- Posted by Grzegorz Wróbel on September 21st, 2006
ajcrm125 wrote:
Make sure it has IsVisible() return true and if so:
1) Get your window rect and clip it to desktop and make sure it's width and height are non-zero;
2) Walk trough Z-order from the top until you get to your app or untill the sum of window rect entirely covers your original rect.
If you reached your window, there is at least small part of it visible, if not it's obscured entirely by other windows.
--
Grzegorz Wróbel
http://www.4neurons.com/
677265676F727940346E6575726F6E732E636F6D
- Posted by Norman Bullen on September 22nd, 2006
Grzegorz Wróbel wrote:
Call InvalidateRect() on your window and see if you get a WM_PAINT
message in a short time.
Norm
--
--
To reply, change domain to an adult feline.
- Posted by Martijn on September 24th, 2006
Hi,
"ajcrm125" <ajcrm125@gmail.com> delighted us with...
Your original question has already been answered, but the following might
help you accomplish whatever you are actually trying to accomplish.
Our friend Raymond Chen () wrote a nice article about this a long time ago
(in fact, there are two):
http://blogs.msdn.com/oldnewthing/ar.../29/54728.aspx
http://blogs.msdn.com/oldnewthing/ar.../02/54758.aspx
Good luck,
--
Martijn
http://www.sereneconcepts.nl
http://blogger.xs4all.nl/mihaak/