Ejemplo n.º 1
0
        internal static string GetRoleText(uint roleId)
        {
            StringBuilder lpszRole = new StringBuilder(0x80);

            OleAccNativeMethods.GetRoleText(roleId, lpszRole, (uint)lpszRole.Capacity);
            return(lpszRole.ToString());
        }
Ejemplo n.º 2
0
        internal static string GetStateText(uint stateBits)
        {
            StringBuilder lpszStateBit = new StringBuilder(0x80);

            OleAccNativeMethods.GetStateText(stateBits, lpszStateBit, (uint)lpszStateBit.Capacity);
            return(lpszStateBit.ToString());
        }
Ejemplo n.º 3
0
        internal static IntPtr GetWindowFromIAccessible(IAccessible accObj)
        {
            IntPtr zero = IntPtr.Zero;

            if (accObj != null)
            {
                OleAccNativeMethods.WindowFromAccessibleObject(accObj, out zero);
            }
            return(zero);
        }
Ejemplo n.º 4
0
        internal static IAccessible GetIAccessibleFromWindow(IntPtr hWnd)
        {
            IAccessible ppvObject = null;

            if (!hWnd.Equals(IntPtr.Zero))
            {
                OleAccNativeMethods.AccessibleObjectFromWindow(hWnd, OleAccObjectId.OBJID_CLIENT, ref OleAccNativeMethods.IID_IAccessible, ref ppvObject);
            }
            return(ppvObject);
        }
Ejemplo n.º 5
0
        internal static void RefreshAccessibleChildren(IAccessible accObj, out int childCount)
        {
            int num;

            childCount = GetChildCount(accObj);
            if (childCount > _AccessibleChildren.Length)
            {
                _AccessibleChildren = new object[childCount];
            }
            if ((childCount > 0) && (OleAccNativeMethods.AccessibleChildren(accObj, 0, childCount, _AccessibleChildren, out num) == 1))
            {
                childCount = num;
            }
        }