为了识别背景过程&带到C ++ WIN32的前台 [英] To identify the background process & bring to foreground in C++ WIN32

查看:164
本文介绍了为了识别背景过程&带到C ++ WIN32的前台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我如何识别特定的后台进程(即,已经运行应用程序)并带到前台?例如,如果一个记事本应用程序在后台运行,当我运行我的WIN32应用程序,它应该识别记事本应用程序和记事本应该弹出或前台。

Can anyone tell me how to identify a particular background process (i.e., Already running application) and bring to foreground? For example, if a Notepad application is running in the background, when I run my WIN32 application, it should identify the Notepad application and notepad should pop up or come to foreground.

我尝试SwitchToThisWindow()函数,但它的工作原理像Alt +选项卡。它不会标识后台进程。

I tried SwitchToThisWindow() function, but it works like Alt+tab. It will not identify the background process.

这表明我的演练指南。

谢谢。 。

推荐答案


但是有什么方法可以识别后台进程

But is there any way to identify the background process

这是一个Unix shell概念,Windows没有它。现在我有10个后台进程,创建了不在前台的窗口,另一个好50还没有。他们都不是背景过程,他们都是同样的背景。通常单击窗口的任务栏按钮或按Alt + Tab将其中一个切换到前台。或者在代码中调用SetForegroundWindow()。

That's a Unix shell notion, Windows doesn't have it. Right now I've got 10 "background" processes that have created windows that are not in the foreground, another good 50 or so that have not. None of them are THE background process, they are all equally backgroundish. You normally click the taskbar button for a window or press Alt+Tab to switch one of them to the foreground. Or call SetForegroundWindow() in code.

这篇关于为了识别背景过程&带到C ++ WIN32的前台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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