0

I have a problem to verify the visibility for windows on Windows 10. The problem exists on some windows components such as Action Center, Notifications, People etc (All of them are Windows.UI.Core.CoreWindow).

I tried to use methods from winapi:

  • IsWindowVisible -> for these window the method alvays returns true(when window is visible and invisible)
  • GetWindowRect -> for the notification window, when it is visible I get correct size, after hiding the height is 1px. Other windows have the same size and position all the time.
  • GetWindowLong -> I tried to get window styles but this all windows have the same styles all time (WS_POPUP | WS_VISIBLE | WC_CLIPSIBLINGS) and extension styles (WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR | WS_EX_TOPMOST).
  • GetWindowPlacement -> all the time field flag = 0 -> SW_HIDE

Does anyone have an idea how can I correctly verify the visibility of these windows?

  • Because return true, when Action Center/Notifications/etc window are invisible on desktop – Janusz Ryrych Feb 01 '18 at 00:02
  • the location of the window with handle matches the position when the window is visible (Confirmed by spy ++/getWindowsRect). The name of the window (get by GetWindowText / spy++) also agrees – Janusz Ryrych Feb 01 '18 at 00:10
  • this is [answer](https://stackoverflow.com/a/33577647/6401656) – RbMm Feb 01 '18 at 00:43
  • 1
    `DwmGetWindowAttribute(hwnd, DWMWA_CLOAKED, &CloakedVal, sizeof( CloakedVal ))` returned `DWM_CLOAKED_SHELL` in `CloakedVal` - *The window was cloaked by the Shell.* – RbMm Feb 01 '18 at 00:48
  • also look for [this](https://stackoverflow.com/a/23180386/6401656) – RbMm Feb 01 '18 at 00:55

0 Answers0