开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

12
返回列表 发新帖
收起左侧

[闲聊] 怎么易语言没有AccessibleObjectFromWindow的例程

[复制链接]
结帖率:50% (1/2)
发表于 2015-11-12 10:35:19 | 显示全部楼层   广东省东莞市
dsafdasfdasfdsafdsfdsfa
回复 支持 反对

使用道具 举报

结帖率:0% (0/1)
发表于 2015-2-10 22:10:29 | 显示全部楼层   重庆市重庆市
正研究
回复 支持 反对

使用道具 举报

发表于 2014-9-12 20:18:23 | 显示全部楼层   北京市北京市
不清楚  菜鸟路过
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-9-12 16:41:47 | 显示全部楼层   湖南省永州市
宇智波·晓易 发表于 2014-9-12 07:58
楼主可以加我,我们一起玩玩哦。

恩,加你了
回复 支持 反对

使用道具 举报

结帖率:100% (9/9)
发表于 2014-9-12 10:45:31 | 显示全部楼层   广东省东莞市
见实例: 取Word窗口对象AccessibleObjectFromWindow.rar (7.49 KB, 下载次数: 427)

评分

参与人数 2好评 +2 精币 +4 收起 理由
宇智波·晓易 + 1 + 4 大神来了
╬部落酋长o + 1 好人有好报......

查看全部评分

回复 支持 反对

使用道具 举报

结帖率:100% (7/7)

签到天数: 3 天

发表于 2014-9-12 07:58:41 | 显示全部楼层   重庆市重庆市
360软件小助手截图20140912075507.jpg 楼主可以加我,我们一起玩玩哦。
回复 支持 反对

使用道具 举报

结帖率:100% (13/13)

签到天数: 14 天

发表于 2014-9-12 01:52:21 | 显示全部楼层   广东省清远市
半夏时光 发表于 2014-9-12 01:45
简单的说,干嘛用的

1.检索与指定窗口相关联的对象接口地址2.可用于遍历DirectUI窗口控件
3.其他相关类的函数可勾取、拦截、自绘等句柄、ID、类等相关信息


AccessibleObjectFromWindow function
Retrieves the address of the specified interface for the object associated with the specified window.
Syntax[url=]C++[/url]



STDAPI AccessibleObjectFromWindow(  _In_   HWND hwnd,  _In_   DWORD dwObjectID,  _In_   REFIID riid,  _Out_  void **ppvObject);



Parametershwnd [in]
Type: HWND
Specifies the handle of a window for which an object is to be retrieved. To retrieve an interface pointer to the cursor or caret object, specify NULL and use the appropriate object ID in dwObjectID.
dwObjectID [in]
Type: DWORD
Specifies the object ID. This value is one of the standard object identifier constants or a custom object ID such as OBJID_NATIVEOM, which is the object ID for the Office native object model. For more information about OBJID_NATIVEOM, see the Remarks section in this topic.
riid [in]
Type: REFIID
Specifies the reference identifier of the requested interface. This value is either IID_IAccessible or IID_IDispatch, but it can also be IID_IUnknown, or the IID of any interface that the object is expected to support.
ppvObject [out]
Type: void**
Address of a pointer variable that receives the address of the specified interface.
Return value
Type: STDAPI
If successful, returns S_OK.
If not successful, returns one of the following or another standard COM error code.
Return codeDescription
E_INVALIDARG
An argument is not valid.
E_NOINTERFACE
The requested interface is not supported.

Remarks
Clients call this function to retrieve the address of an object's IAccessible, IDispatch, IEnumVARIANT,IUnknown, or other supported interface pointer.
As with other IAccessible methods and functions, clients might receive errors for IAccessible interface pointers because of a user action. For more information, see Receiving Errors for IAccessible Interface Pointers.
Clients use this function to obtain access to the Microsoft Office 2000 native object model. The native object model provides clients with accessibility information about an Office application's document or client area that is not exposed by Microsoft Active Accessibility.
To obtain an IDispatch interface pointer to a class supported by the native object model, specifyOBJID_NATIVEOM in dwObjectID. When using this object identifier, the hwnd parameter must match the following window class types.
Office applicationWindow classIDispatch pointer to
Word_WwGWindow
ExcelEXCEL7Window
PowerPointpaneClassDCDocumentWindow
Command BarsMsoCommandBarCommandBar

Note that the above window classes correspond to the innermost document window or pane window. For more information about the Office object model, see the Microsoft Office 2000/Visual Basic Programmer's Guide.
Requirements
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Redistributable
Active Accessibility 1.3 RDK on Windows NT 4.0 with SP6 and later and Windows 95
Header
Oleacc.h
Library
Oleacc.lib
DLL
Oleacc.dll
See alsoIAccessibleAccessibleObjectFromEventAccessibleObjectFromPointIDispatch



点评

没有例程看MSDN看不懂   湖南省永州市  发表于 2014-9-12 04:59
IAccessible AccessibleObjectFromWindow   广东省清远市  发表于 2014-9-12 01:55

评分

参与人数 1好评 +1 精币 +5 收起 理由
半夏时光 + 1 + 5 谢了

查看全部评分

回复 支持 反对

使用道具 举报

结帖率:100% (13/13)

签到天数: 14 天

发表于 2014-9-12 01:36:56 | 显示全部楼层   广东省清远市

The WindowFromAccessibleObject function retrieves the window handle that corresponds to a given instance of an IAccessible interface.




STDAPI WindowFromAccessibleObject(  IAccessible* pacc,  HWND* phwnd);


Parameterspacc[in] Pointer to the IAccessible interface whose corresponding window handle will be retrieved. This parameter must not be NULL.phwnd[out] Address of a variable that receives a handle to the window containing the object specified in pacc. If this value is NULL after the call, the object was not contained within a window. (For example, the mouse pointer is not contained within a window.)Return Values

If successful, returns S_OK.

If not successful, returns the following or another standard COM error code.

Error
Description
E_INVALIDARGAn argument is invalid.

Requirements

  Windows NT/2000/XP/Server 2003: Included in Windows 2000 and later.
  Windows 95/98/Me: Included in Windows 98 and later.
  Redistributable: Requires Active Accessibility 1.3 RDK on Windows NT 4.0 SP6 and Windows 95.
  Header: Declared in Oleacc.h.
  Library: Use Oleacc.lib.

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 793400750,邮箱:wp@125.la
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表