Beispiel #1
0
        public IEnumerable <SpiedWindow> GetChildren()
        {
            var children = new List <SpiedWindow>();

            MyUser32.EnumChildWindows(Handle, (hWnd, lp) =>
            {
                children.Add(new SpiedWindow(hWnd));
                return(true);
            }, IntPtr.Zero);
            return(children);
        }
Beispiel #2
0
        public static Win32ErrorCode EnableWM_CopyData(IntPtr windowHandle)
        {
            CHANGEFILTERSTRUCT changeFilter = new CHANGEFILTERSTRUCT();

            changeFilter.size = (uint)Marshal.SizeOf(changeFilter);
            changeFilter.info = 0;
            if (!MyUser32.ChangeWindowMessageFilterEx(windowHandle, User32.WindowMessage.WM_COPYDATA, ChangeWindowMessageFilterExAction.Allow, ref changeFilter))
            {
                return(Kernel32.GetLastError());
            }
            else
            {
                return(Win32ErrorCode.ERROR_SUCCESS);
            }
        }
Beispiel #3
0
 public SpiedWindow GetParentWindow()
 {
     return(new SpiedWindow(MyUser32.GetParent(Handle)));
 }