Exemplo n.º 1
0
 private static bool NeedSpecialCapturing(IntPtr hWnd)
 {
     if (Win32Ext.IsIconic(hWnd))
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 2
0
        private WindowSnap(IntPtr hWnd, bool specialCapturing)
        {
            Rectangle rect = GetWindowPlacement(hWnd);

            {
                this.IsMinimized = Win32Ext.IsIconic(hWnd);
                this.Handle      = hWnd;
                this.Size        = rect.Size;
                this.Location    = rect.Location;
                this.Text        = GetWindowText(hWnd);
                this.Image       = GetWindowImage(hWnd, this.Size);
            }

            ChildSupport(hWnd);

            if (specialCapturing)
            {
                EnterSpecialCapturing(hWnd);
            }
        }
Exemplo n.º 3
0
        private static bool EnumWindowsCallback(IntPtr hWnd, IntPtr lParam)
        {
            bool specialCapturing = false;

            if (hWnd == IntPtr.Zero)
            {
                return(false);
            }
            if (!Win32Ext.IsWindowVisible(hWnd))
            {
                return(true);
            }
            if (!countMinimizedWindows)
            {
                if (Win32Ext.IsIconic(hWnd))
                {
                    return(true);
                }
            }
            else if (Win32Ext.IsIconic(hWnd) && useSpecialCapturing)
            {
                specialCapturing = true;
            }

            if (GetWindowText(hWnd) == Win32Ext.PROGRAMMANAGER)
            {
                return(true);
            }

            var Snap = new WindowSnap(hWnd, specialCapturing);

            if (!Snap.Text.Equals(""))
            {
                windowSnaps.Add(Snap);
            }

            return(true);
        }