tags:

views:

231

answers:

2

How can I do it? It's an external window, not from my program. Thanks

+5  A: 

Do you have an HWND to the window? If not, then you will need to obtain the window handle somehow, for example through FindWindow() (or FindWindowEx()).

Once you have the HWND to the window, call IsWindowVisible().

Greg Hewgill
duh, im so dumb. I actually had the impression that function would exist but never cared to look for it. Thanks!
devoured elysium
+3  A: 

one nuance to be aware of. IsWindowVisible will return the true visibility state of the window, but that includes the visibility of all parent windows as well.

if you need to check the WS_VISIBLE flag for a specific window you can do GetWindowLong(hWnd, GWL_STYLE) and test for WS_VISIBLE.

...it sounds like you don't need to do this for your case, but adding this for future reference in case others run across this question.

~jewels

Jewel S