将焦点设置回Microsoft Word的文档窗口。 [英] Set Focus back to Document Window of Microsoft Word.

查看:140
本文介绍了将焦点设置回Microsoft Word的文档窗口。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能涉及的人:


问题:选择一个文本块或将光标放在我自定义设计的软件中后,会打开一个下拉菜单。用户从下拉菜单中选择一个选项后,将打开一个对话框。打开对话框后,我的自定义
设计程序将把焦点返回到Microsoft Word的文档窗口。不幸的是,我的程序员使用的当前方法无法将焦点返回到Microsoft Word的文档窗口。


我需要实现什么代码才能成功地将焦点重新设置回Document打开对话框后,Microsoft Word窗口?


注意:我相信打开对话框的操作会导致对话框从文档窗口中获取焦点Microsoft Word。






解决方案

查看SetForegroundWindow是否有帮助。


https://msdn.microsoft.com/it-it/library /windows/desktop/ms633539%28v=vs.85%29.aspx


To Whom it may concern:

Problem: A drop down menu is opened up after selecting a block of text or positioning the cursor in my custom designed software. A dialog box is opened up after a user selects an option from the drop down menu. After the dialog box is opened up, my custom designed program is suppose to return the focus back to the Document Window of Microsoft Word. Unfortunately, the present method used by my programmer fails to return the focus back to the Document Window of Microsoft Word.

What code do I have to implement to successfully set the focus back to the Document Window of Microsoft Word, after the dialog box has been opened up?

Note: I believe that the act of opening up the dialog box causes the dialog box to take the focus from the Document Window of Microsoft Word.


解决方案

See if SetForegroundWindow helps.

https://msdn.microsoft.com/it-it/library/windows/desktop/ms633539%28v=vs.85%29.aspx


这篇关于将焦点设置回Microsoft Word的文档窗口。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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