简体   繁体   English

如何从C#中使用Win32获得可访问的名称?

[英]How can I get the accessible name using win32 from c#?

How can I get the accessible name using win32 from c#? 如何从C#中使用Win32获得可访问的名称? (the accessible name was set using the standard win form designer) (可访问名称是使用标准的win表单设计器设置的)

You Must use the Windows Automation API ( sounds strange for accesibility). 您必须使用Windows Automation API(对于可访问性来说听起来很奇怪)。 Call 呼叫

STDAPI AccessibleObjectFromWindow(
  __in   HWND hwnd,
  __in   DWORD dwObjectID,
  __in   REFIID riid,
  __out  void **ppvObject
);

with the REFIID IAccessible. 与REFIID IAccessible。 Cast ppvObject into IAccessible and read the member get_accName. 将ppvObject强制转换为IAccessible并读取成员get_accName。

Windows Accessible API on MSDN MSDN上的Windows Accessible API

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在C#/ Win32中获取正在运行的进程的DOS路径名? - How can I get the DOS path name of a running process in C# / Win32? 在C#中从Win32 API获取摄像机信息 - Get camera information from Win32 API in C# 在 Win32 中使用 C# Winforms - Using C# Winforms with Win32 如何在Win32 C ++项目中使用C#dll? - How can i use a C# dll in a Win32 C++ project? 如何从 C# 调用 Win32 GetCurrentDirectory 函数? - How to call the Win32 GetCurrentDirectory function from C#? 如何从C#处理非托管Win32异常 - How to handle unmanaged Win32 exception from C# 当从本机win32应用程序调用C#COM程序集时,如何调试它? - How can I debug a C# COM assembly when it's being called from a native win32 application? 在c#中使用win32从窗口获取位图:我在哪里出错? - Getting Bitmap from a window using win32 in c#: Where am I going wrong? 如何在Win32应用程序中托管ac#控件? - How can I host a c# control in a win32 app? How can I retrieve a generic folder icon in C# that appears small & open on Windows 10, using either the Win32 API or the Windows API Code Pack? - How can I retrieve a generic folder icon in C# that appears small & open on Windows 10, using either the Win32 API or the Windows API Code Pack?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM