Communicator API:如何获得先前开放的MOC聊天? [英] Communicator API: How to get MOC chats previously open??

查看:96
本文介绍了Communicator API:如何获得先前开放的MOC聊天?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在为Office 2007创建一个插件,我通过'Communicator API'与MOC 2007进行交互。使用它,一旦我的办公室文档打开,我就会获得MOC联系人在线状态以及聊天打开或关闭时的事件。

我的问题是当我想向用户发送消息时:据我所知,我需要创建聊天(CommunicatorAPI.IMessengerAdvanced中的'StartConversation()')当我收到'OnIMWindowCreated'事件时,我发送文本(IMessengerConversationWndAdvanced中的'SendText()')
当我与远程用户进行新的聊天时,它对我有用,因为我收到了这个事件。但是如果我在我的办公室文档打开之前打开了这个用户的聊天,我的插件中没有"OnIMWindowCreated"事件......那么如何在聊天中发送文本呢?

我的问题是:在我打开办公室文档之前可以获得MOC聊天吗?还是有另一种解决方案吗?

我希望你能理解我...

非常感谢

迭戈

Hi,

I am creating a plugin for Office 2007 where I interact with MOC 2007 via 'Communicator API'. Using that, I get the MOC contact presence status, and  the events when a chat is open or closed, once my office document is open.

My problem is when I want to send a message to a user: As far as I know, I need to create the chat ('StartConversation()' in CommunicatorAPI.IMessengerAdvanced) and when I receve the 'OnIMWindowCreated' event I send the text ('SendText()' in IMessengerConversationWndAdvanced)

It works for me when this is a new chat with the remote user, since I receive the event. But if I had a chat with this user open before my office doc was open, I get no 'OnIMWindowCreated' event in my plugin... So how can I sent the text in that chat??

My question is: Can get the MOC chats which were open before I open my office doc? Or is there another solution for that problem?

I hope you could understand me...

Thanks a lot

Diego

推荐答案

不,使用OC自动化API,您只能获得注册事件后创建的窗口的OnIMWindowCreated事件。您看到的行为是在用户仍处于打开状态时重新使用对话窗口的标准OC行为。
您可以使用标准的Win32 API枚举窗口句柄并找出哪些是对话窗口。


No, using the OC automation API you can only get the OnIMWindowCreated event for windows that are created after you register for the event.  The behavior you are seeing is the standard OC behaviour of reusing a conversation window with a user if one is still open.

You could use standard Win32 APIs to enumerate Window Handles and figure out which ones are conversation windows.



这篇关于Communicator API:如何获得先前开放的MOC聊天?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆