c++进程始终在窗口操作系统的前台

标签 c++ c windows

我有一个 C++ 进程,我希望该进程始终保持在前台,请指导我如何实现它?

最佳答案

这是不可能的,因为用户总是可以选择切换到另一个应用程序。这是设计使然。

良好的链接来自 Billy ONeal :

How do I create a window that is never covered by any other windows, not even other topmost windows?

Imagine if this were possible and imagine if two programs did this. Program A creates a window that is "super-topmost" and so does Program B. Now the user drags the two windows so that they overlap. What happens? You've created yourself a logical impossibility. One of those two windows must be above the other, contradicting the imaginary "super-topmost" feature.

关于c++进程始终在窗口操作系统的前台,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2605099/

相关文章:

c - *s++ 中发生了什么?

windows - 使用 CMake 2.8.11.2 编译 osgQt (Windows7 MSVS11 Qt 5.1 OSG 3.2.0)

Windows 窗体,阻止子控件继承 Form/GroupBox/Parent 的 Font

c++ - 如何在scanf中使用char双指针?

c++ - 如何在 CMake 生成的解决方案中使用相对路径打开源代码中的文件

c# - 如何使用共享内存将 int[] 从 C# 传递到 C++

c# - 获取 .net 应用程序的事件窗口

c++ - 我可以在 Qt 中的 QListView 中添加列吗?

c++ - Visual C++::'malloc' 中的奇怪错误:函数不带 1 个参数

c - Linux 中 C 语言编程的参数