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; }
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); }
/// <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); }
/// <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); }
/// <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; }