I am trying to find the windows 10 media overlay popup through enumerating all child windows.
It appears in spy++ as 0x1023c
Its able to find it with FindWindowEx
, but not with EnumChildWindows
or EnumWindows
.
var targetWindow = FindWindowEx(new IntPtr(0x10010), IntPtr.Zero, "NativeHWNDHost", null);
EnumChildWindows(new IntPtr(0x10010), (hwnd2, lpvoid) =>
{
Console.WriteLine(hwnd2.ToString());
if (targetWindow == hwnd2)
{
Console.WriteLine("Found it");
}
return true;
}, IntPtr.Zero);
Is there a reason why EnumChildWindows
fails to find it? Its not a message only window.