应用程序窗口移至最前

应用程序窗口移至最前

本文介绍了应用程序窗口移至最前的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您如何将应用程序带到最前端?不是应用程序的窗口(SetWindowPos()),而是整个应用程序?

我不会介绍原因,但我有一个应用程序.一个对话框,该对话框在单独的线程中打开另一个对话框.我禁用了启动该线程的调用对话框,以使该线程具有更多的模态作用.当线程中的对话框被关闭时,我重新启用了调用对话框.但是,发生的情况是调用对话框的应用程序不再具有焦点.我希望调用对话框/应用程序具有焦点.我尝试使用SetWindowPos(),但是除非您使用wndTopMost标志,否则它将无法正常工作.但是我不希望它成为永久性的最高职位(发生这种情况),而只是为了保持其关注重点.

有什么想法吗?

在此先感谢

How do you bring an application to the front? Not a window of an application (SetWindowPos()), but the whole application?

I won''t go into the why, but I have an app. with a dialog that opens a second dialog in a separate thread. I disable the calling dialog that starts this thread so that the thread acts more modal. When the dialog in the thread gets dismissed, I re-enable the calling dialog. What happens, though, is that the calling dialog''s application doesn''t have focus anymore. I want the calling dialog/application to have focus. I tried using SetWindowPos() but that doesn''t work unless you use the wndTopMost flag. But I don''t want it to be top most permanently (which is what happens), but just to maintain its focus.

Any ideas?

Thanks in advance

推荐答案



这篇关于应用程序窗口移至最前的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 01:58