Beispiel #1
0
        private Int32 EnumChildWindowProc(IntPtr hwnd, Int32 lParam)
        {
            ApiWindow window = GetWindowIdentification(hwnd);

            if (_childClass.Length == 0 || window.ClassName.ToLower() == _childClass.ToLower())
            {
                _listChildren.Add(window);
            }
            return(1);
        }
Beispiel #2
0
        private ApiWindow GetWindowIdentification(IntPtr hwnd)
        {
            System.Text.StringBuilder classBuilder = new System.Text.StringBuilder(64);
            GetClassName(hwnd, classBuilder, 64);

            ApiWindow window = new ApiWindow();

            window.ClassName       = classBuilder.ToString();
            window.MainWindowTitle = WindowText(hwnd);
            window.hWnd            = hwnd;
            return(window);
        }
Beispiel #3
0
 private Int32 EnumWindowProc(IntPtr hwnd, Int32 lParam)
 {
     if (GetParent(hwnd) == 0 && IsWindowVisible(hwnd))
     {
         ApiWindow window = GetWindowIdentification(hwnd);
         if (_topLevelClass.Length == 0 || window.ClassName.ToLower() == _topLevelClass.ToLower())
         {
             _listTopLevel.Add(window);
         }
     }
     return(1);
 }