예제 #1
0
        public EnumerateWindow AddChild(int _handle, String _caption, String _className)
        {
            EnumerateWindow child = new EnumerateWindow(_handle, _caption, _className);

            if (this.childWindows == null)
            {
                this.childWindows = new ArrayList();
            }
            this.childWindows.Add(child);

            return child;
        }
예제 #2
0
        public EnumerateWindow AddChild(int _handle, String _caption, String _className)
        {
            EnumerateWindow child = new EnumerateWindow(_handle, _caption, _className);

            if (this.childWindows == null)
            {
                this.childWindows = new ArrayList();
            }
            this.childWindows.Add(child);

            return(child);
        }
예제 #3
0
        /// <summary>
        /// The EnumChildWindows' callback function.
        /// </summary>
        /// <param name="hWnd">Window handle</param>
        /// <param name="lParam">Additional data(In this, IList for saving data)</param>
        /// <returns></returns>
        private static int WindowEnum(IntPtr hWnd, ref IList lParam)
        {
            EnumerateWindow enumWindow = new EnumerateWindow();
            StringBuilder   className  = new StringBuilder(255);
            StringBuilder   caption    = new StringBuilder(255);

            GetClassName(hWnd, className, className.Capacity);
            GetWindowText(hWnd.ToInt32(), caption, caption.Capacity);

            enumWindow.handle    = hWnd;
            enumWindow.className = className;
            enumWindow.caption   = caption;
            lParam.Add(enumWindow);

            return(1);
        }
예제 #4
0
        /// <summary>
        /// Set the presentation's window information.
        /// </summary>
        private void InitializeWindowInfo()
        {
            EnumerateWindow enumWindow;
            EnumerateWindow enumChildWindow;

            // HanShow 2010
            enumWindow = new EnumerateWindow(0, "슬라이드 쇼", "CHslShowView");
            windowInfo.Add(enumWindow);

            // Microsoft PowerPoint 2007
            enumWindow      = new EnumerateWindow(0, "", "screenClass");
            enumChildWindow = enumWindow;
            enumChildWindow = enumChildWindow.AddChild(0, "슬라이드 쇼", "PaneClassDC");
            windowInfo.Add(enumWindow);

            // SlideShare
            enumWindow      = new EnumerateWindow(0, "Upload & Share PowerPoint presentations and documents - Chrome", "Chrome_WidgetWin_1");
            enumChildWindow = enumWindow;
            enumChildWindow = enumChildWindow.AddChild(0, "Upload & Share PowerPoint presentations and documents", "Chrome_WidgetWin_0");
            enumChildWindow = enumChildWindow.AddChild(0, "", "Chrome_RenderWidgetHostHWND");
            windowInfo.Add(enumWindow);
        }
예제 #5
0
        /// <summary>
        /// Set the presentation's window information.
        /// </summary>
        private void InitializeWindowInfo()
        {
            EnumerateWindow enumWindow;
            EnumerateWindow enumChildWindow;

            // HanShow 2010
            enumWindow = new EnumerateWindow(0, "슬라이드 쇼", "CHslShowView");
            windowInfo.Add(enumWindow);

            // Microsoft PowerPoint 2007
            enumWindow = new EnumerateWindow(0, "", "screenClass");
            enumChildWindow = enumWindow;
            enumChildWindow = enumChildWindow.AddChild(0, "슬라이드 쇼", "PaneClassDC");
            windowInfo.Add(enumWindow);

            // SlideShare
            enumWindow = new EnumerateWindow(0, "Upload & Share PowerPoint presentations and documents - Chrome", "Chrome_WidgetWin_1");
            enumChildWindow = enumWindow;
            enumChildWindow = enumChildWindow.AddChild(0, "Upload & Share PowerPoint presentations and documents", "Chrome_WidgetWin_0");
            enumChildWindow = enumChildWindow.AddChild(0, "", "Chrome_RenderWidgetHostHWND");
            windowInfo.Add(enumWindow);
        }
예제 #6
0
        /// <summary>
        /// The EnumChildWindows' callback function.
        /// </summary>
        /// <param name="hWnd">Window handle</param>
        /// <param name="lParam">Additional data(In this, IList for saving data)</param>
        /// <returns></returns>
        private static int WindowEnum(IntPtr hWnd, ref IList lParam)
        {
            EnumerateWindow enumWindow = new EnumerateWindow();
            StringBuilder className = new StringBuilder(255);
            StringBuilder caption = new StringBuilder(255);

            GetClassName(hWnd, className, className.Capacity);
            GetWindowText(hWnd.ToInt32(), caption, caption.Capacity);

            enumWindow.handle = hWnd;
            enumWindow.className = className;
            enumWindow.caption = caption;
            lParam.Add(enumWindow);

            return 1;
        }