BrightnessTray.NativeMethods.GetChildButtonWindows C# (CSharp) Метод

GetChildButtonWindows() публичный статический Метод

Returns a list of handles for windows of the class 'ToolbarWindow32'.
public static GetChildButtonWindows ( IntPtr parent ) : List
parent System.IntPtr The handle of the parent window whose children should be searched.
Результат List
        public static List<IntPtr> GetChildButtonWindows(IntPtr parent)
        {
            List<IntPtr> result = new List<IntPtr>();
            GCHandle listHandle = GCHandle.Alloc(result);

            try
            {
                EnumWindowProc childProc = new EnumWindowProc(EnumButtonWindow);
                EnumChildWindows(parent, childProc, GCHandle.ToIntPtr(listHandle));
            }
            finally
            {
                if (listHandle.IsAllocated)
                    listHandle.Free();
            }

            return result;
        }