Пример #1
0
        private void ProcessForm_Load(object sender, EventArgs e)
        {
            // Note: While setting the AccessibleDescription of the control leads to the MSAA data
            // for for the control being updated, that change does not get propagated through the
            // UIA API to clients such as Narrator. So do not use AccessibleDescription. In fact,
            // MSDN states: "Pitfall: Do Not Use AccDescription".
            // https://msdn.microsoft.com/en-us/windows/desktop/gg712256.aspx

            // Note: The Accessibility namespace suggest that IAccPropServices can be used
            // in a WinForms app in a similar way to how it can be used in a Win32 app.
            // GuyBark: I can't get this to work. Maybe my GetRemotableHandle() is no good?

            var services = new Accessibility.CAccPropServices();

            Accessibility._RemotableHandle rApp = GetRemotableHandle(buttonProcess.Handle);

            Guid HelpText_Property_GUID = new Guid(
                0x08555685, 0x0977, 0x45c7, 0xa7, 0xa6, 0xab, 0xaf, 0x56, 0x84, 0x12, 0x1a);

            // This doesn't work.
            services.SetHwndPropStr(
                ref rApp,
                0xFFFFFFFC, // OBJID_CLIENT
                0,          // CHILDID_SELF
                HelpText_Property_GUID,
                "Some localized helpful test");
        }
Пример #2
0
 [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] public virtual void SetHwndPropServer([System.Runtime.InteropServices.ComAliasNameAttribute("Accessibility.wireHWND")][System.Runtime.InteropServices.In] ref Accessibility._RemotableHandle hwnd, [System.Runtime.InteropServices.In] uint idObject, [System.Runtime.InteropServices.In] uint idChild, [System.Runtime.InteropServices.In] ref System.Guid paProps, [System.Runtime.InteropServices.In] int cProps, [System.Runtime.InteropServices.In][System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.Interface)] Accessibility.IAccPropServer pServer, [System.Runtime.InteropServices.In] Accessibility.AnnoScope AnnoScope)
 {
 }
Пример #3
0
 [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] public virtual void SetHmenuPropStr([System.Runtime.InteropServices.ComAliasNameAttribute("Accessibility.wireHMENU")][System.Runtime.InteropServices.In] ref Accessibility._RemotableHandle hmenu, [System.Runtime.InteropServices.In] uint idChild, [System.Runtime.InteropServices.In] System.Guid idProp, [System.Runtime.InteropServices.In][System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] string str)
 {
 }
Пример #4
0
 [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] public virtual void SetHwndProp([System.Runtime.InteropServices.ComAliasNameAttribute("Accessibility.wireHWND")][System.Runtime.InteropServices.In] ref Accessibility._RemotableHandle hwnd, [System.Runtime.InteropServices.In] uint idObject, [System.Runtime.InteropServices.In] uint idChild, [System.Runtime.InteropServices.In] System.Guid idProp, [System.Runtime.InteropServices.In][System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.Struct)] object var)
 {
 }
Пример #5
0
 [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] public virtual void ClearHwndProps([System.Runtime.InteropServices.ComAliasNameAttribute("Accessibility.wireHWND")][System.Runtime.InteropServices.In] ref Accessibility._RemotableHandle hwnd, [System.Runtime.InteropServices.In] uint idObject, [System.Runtime.InteropServices.In] uint idChild, [System.Runtime.InteropServices.In] ref System.Guid paProps, [System.Runtime.InteropServices.In] int cProps)
 {
 }
Пример #6
0
 [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)] public virtual void ComposeHwndIdentityString([System.Runtime.InteropServices.ComAliasNameAttribute("Accessibility.wireHWND")][System.Runtime.InteropServices.In] ref Accessibility._RemotableHandle hwnd, [System.Runtime.InteropServices.In] uint idObject, [System.Runtime.InteropServices.In] uint idChild, [System.Runtime.InteropServices.Out] System.IntPtr ppIDString, out uint pdwIDStringLen)
 {
     ppIDString = default(System.IntPtr); pdwIDStringLen = default(uint);
 }
Пример #7
0
 public virtual void SetHwndPropStr([System.Runtime.InteropServices.In] ref Accessibility._RemotableHandle hwnd, [System.Runtime.InteropServices.In] uint idObject, [System.Runtime.InteropServices.In] uint idChild, [System.Runtime.InteropServices.In] System.Guid idProp, [System.Runtime.InteropServices.In][System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] string str)
 {
 }
Пример #8
0
 public virtual void SetHwndPropServer([System.Runtime.InteropServices.In] ref Accessibility._RemotableHandle hwnd, [System.Runtime.InteropServices.In] uint idObject, [System.Runtime.InteropServices.In] uint idChild, [System.Runtime.InteropServices.In] ref System.Guid paProps, [System.Runtime.InteropServices.In] int cProps, [System.Runtime.InteropServices.In][System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.Interface)] Accessibility.IAccPropServer pServer, [System.Runtime.InteropServices.In] Accessibility.AnnoScope AnnoScope)
 {
 }
Пример #9
0
 public virtual void SetHmenuProp([System.Runtime.InteropServices.In] ref Accessibility._RemotableHandle hmenu, [System.Runtime.InteropServices.In] uint idChild, [System.Runtime.InteropServices.In] System.Guid idProp, [System.Runtime.InteropServices.In][System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.Struct)] object var)
 {
 }
Пример #10
0
 public virtual void ComposeHwndIdentityString([System.Runtime.InteropServices.In] ref Accessibility._RemotableHandle hwnd, [System.Runtime.InteropServices.In] uint idObject, [System.Runtime.InteropServices.In] uint idChild, [System.Runtime.InteropServices.Out] System.IntPtr ppIDString, out uint pdwIDStringLen)
 {
     ppIDString = default(System.IntPtr); pdwIDStringLen = default(uint);
 }
Пример #11
0
 public virtual void ClearHwndProps([System.Runtime.InteropServices.In] ref Accessibility._RemotableHandle hwnd, [System.Runtime.InteropServices.In] uint idObject, [System.Runtime.InteropServices.In] uint idChild, [System.Runtime.InteropServices.In] ref System.Guid paProps, [System.Runtime.InteropServices.In] int cProps)
 {
 }