InvisibleApp窃取焦点 [英] InvisibleApp steals Focus

查看:105
本文介绍了InvisibleApp窃取焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用来自非托管c ++的Visio 2007 SDK。

I'm using the Visio 2007 SDK from unmanaged c++.

当我使用"InvisibleApp"创建一个不可见的Visio实例时并打开一个文档,Visio窃取了我的应用程序的焦点,该应用程序当前在桌面上处于活动状态,并激活隐藏的Visio窗口。

When I create an invisible instance of Visio with "InvisibleApp" and open a document, Visio steals the focus from my application, which is currently active on the desktop, and activates the invisible Visio window.

是否有任何可能阻止Visio进行操作这个,以便我的应用程序保持焦点?

Is there any possibilty to prevent Visio from doing this, so that my application keeps the focus?

推荐答案

您好,

与其他Office不同应用程序,一旦您创建新的Visio应用程序对象,将显示Visio UI。显示UI时,焦点将更改为创建的新窗口(即Visio窗口)。

Unlike other Office applications, Visio UI will be displayed once you create a new Visio Application object. When the UI is displayed, the focus will be changed to the new window created (that is Visio window).

您可以使用SetActiveWindow()方法将焦点恢复到应用程序。

You can use SetActiveWindow() method to get the focus back to your application.

有关SetActiveWindow()的更多信息,请参阅以下文章:

For more information on SetActiveWindow() refer to the following article:

http://msdn.microsoft.com/en-us/library/ms646311(VS.85).aspx

谢谢,

Sreerenj

Thanks,
Sreerenj


这篇关于InvisibleApp窃取焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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