How to check if WS_VISIBLE is set in the window? (or if it is visible)

How can i do this? This is an external window, not my program. Thanks

+3
source share
2 answers

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

As soon as you have a window HWND, call IsWindowVisible().

+11
source

One caveat to know about. IsWindowVisible will return the true visibility state of the window, but also includes the visibility of all parent windows.

WS_VISIBLE , GetWindowLong (hWnd, GWL_STYLE) WS_VISIBLE.

... , , , .

+13

Source: https://habr.com/ru/post/1711537/


All Articles