我正在开发一个WPF应用程序,我正在尝试集成某些通信器功能。我希望在我的应用程序中使用的功能之一是能够与网络上的其他人进行聊天对话。但每次我在 MessengerClass 上调用函数 InstantMessage 时,都会弹出一个新窗口。我希望窗口是我的WPF应用程序中的一个框架,它是一个完全独立的对话框。有没有办法将对话窗口设置为我的WPF应用程序中的一个框架(甚至是页面)?
I'm working on a WPF application in which I'm trying to integrate certain communicator functionality. One of the features I'd like to have in my application is the ability to have chat conversations with other people on the network. But each time I call the function InstantMessage on the MessengerClass , a new window is popped up. I'd like the window to be one of the frames in my WPF application intead of being an entirely separate dialog box. Is there a way to set the conversation window to be one of the frames (or even pages) in my WPF application?
推荐答案如果您使用的是OC automation API (MessengerClass)而不是UCC客户端API,那么你只能获得Communicator的窗口而不是你自己的窗口。您可以尝试从ConversationWindowCreated事件获取对话窗口的Window句柄,并使用该句柄将窗口定位在某些"框架"中。在您的WPF应用程序中,但您需要编写代码以在移动应用程序窗口时移动窗口,并在用户调整对话窗口或添加视频或其他媒体时进行处理。 /> If you are using the OC automation API (MessengerClass) and not the UCC client API, then you only get Communicator's windows and not your own. You could try getting the Window handle for the conversation window from the ConversationWindowCreated event and use that to position the window in some "frame" in your WPF app, but you will need to write the code to move the window as your app window is moved and to handle when the conversation window is resized by the user or because video or other media is added.
更多推荐
自定义即时消息对话窗口
发布评论