获取“CC”、“FROM”的句柄和“TO” Outlook 中的窗口
我正在开发一个 Outlook 插件,其中我需要获取阅读窗格中“CC”、“FROM”和“TO”窗口的句柄。 插件中采用的方法是使用 FindWindowEx WIN API 并将名称作为参数传递。但问题是该名称必须采用 Outlook 正在使用的 UI 语言。 我正在尝试找到一种方法来获取这些句柄而不使用名称,但到目前为止还没有运气。我看到“TO”、“FROM”和“CC”都属于同一类(“静态”)。 是否有一些 API 可以让我访问这些窗口而无需使用名称?或者这些窗口是否有一些独立于 Oultook 运行语言的 ID。 一项限制是该插件必须在 Outlook 2003 及更高版本上运行。
编辑: 该插件在阅读窗格中为每封电子邮件添加一个按钮。单击时,将检查当前电子邮件(显示在阅读窗格中)并根据其内容完成某些操作。
I am working on an outlook addin in which I need to get a handle to the "CC", "FROM" and "TO" windows in the reading pane.
The approach that was taken in the addin is to use FindWindowEx WIN API and pass in the name as a parameter. But the problem is that the name must be in the UI language that outlook is using.
I am trying to figure a way to get these handles without using the name, but so far no luck. I see that "TO", "FROM" and "CC" are all of the same Class ("Static").
Is there some API which will give me access to these windows without me having to use the name? Or do these windows have some ID which is independent of the language that Oultook is running in.
One constraint is that the addin must work Outlook 2003 and above.
EDIT:
The addin adds a button in the reading pane for each email. When clicked the current email (displayed in the reading pane) is checked and based on its contents somethings are done.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基本上,您所做的不是使用名称,而是使用分层类名称结构。
即检查器的rctrl_renwnd32\AfxWndW\AfxWndW#32770 中的第一个RichEdit20WPT 始终是TO: 字段。OL2003 和OL2010 的结构略有不同,请使用任何合适的Windows 间谍工具来弄清楚。
Basically, what you do is NOT use the name, use the hierarchical class name structure.
I.e. the first RichEdit20WPT inside the inspector's rctrl_renwnd32\AfxWndW\AfxWndW#32770 is always the TO: field in. OL2003 and OL2010 have slightly different structures, use any decent windows spying tool to figure it out.