Windows:最大化周围/像任务栏一样对待我的窗口?

编程入门 行业动态 更新时间:2024-10-28 08:26:17
本文介绍了Windows:最大化周围/像任务栏一样对待我的窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我们正在开发一个仪表板"应用,它基本上始终在顶部",并以令人讨厌的方式挂在屏幕的左侧.(这是一个内部企业应用程序,而不是世界会受到然后全面拒绝的东西)

We're working on a "dashboard" app that basically "always on top" and hangs out on the left side of the screen in annoying sort of way. (This is an internal corporate app and not something the world will be subjected to and then roundly reject)

我的问题:是否有某种方法可以让其他应用程序窗口将我的应用程序窗口视为任务栏?IE 当有人最大化应用程序时,它不会在我的应用程序后面最大化?

My question: Is there some sort of way to make other application windows treat my application window like the task bar? IE when someone maximizes the application it won't maximize behind my application?

我们已经可以将其保持在顶部,但我认为如果我们在他们最大化时切断 1/8 的应用程序窗口会非常烦人.

We can already keep it on top but I think it's going to be super annoying if we cut off 1/8 of their app windows when they maximize.

我们目前正在用 C++/Qt 编写此代码,并面向 Win7/Win8.

We're currently writing this in C++/Qt and targeting Win7 / Win8.

谢谢!

推荐答案

更新: 最好的方法是使用 AppBar API,如@andrewMedico 的评论中所述.这将确保系统识别应用栏,并确保您正确停靠在屏幕上,并且不会与任务栏或其他应用栏重叠.

Update: The best way to do this is to use the AppBar API as in the comment of @andrewMedico. This will ensure the system is aware of the appbar and will ensure that you are docked to the screen correctly and do not overlap the taskbar or other appbars.

http://msdn.microsoft/en-us/library/windows/desktop/cc144177%28v=vs.85%29.aspx

在 XP 中,您要查找的内容称为桌面乐队".

In XP what you are looking for is called a "Desk Band".

http://msdn.microsoft/en-us/library/windows/desktop/cc144099(v=vs.85).aspx

不幸的是,这在 Windows 7 中已被弃用.我不知道它是否有效.

Unfortunately this is deprecated in windows 7. I don't know if it works or not.

或者,在 Vista 和 WINdows 7 中,您可以使用小工具栏上的小工具.

Alternatively, in Vista and WIndows 7 you can use a Gadget on the gadget bar.

它的基本工作方式是调用SystemParametersInfo(SPI_SETWORKAREA).这告诉系统最大化空间"在哪里.如果您没有使用推荐的 AppBar API,当任何其他程序更改工作区时,您将需要偶尔检查(或收到通知),以确保您被容纳.

The underlying way this works is by calls to SystemParametersInfo(SPI_SETWORKAREA). This tells the system where the "maximise space" is. If you are not using the recommended AppBar API, you will need to occasionally check (or get notifications) when any other program changes the work area so you can ensure you are accommodated.

这篇关于Windows:最大化周围/像任务栏一样对待我的窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-25 20:48:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1123460.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:任务栏   窗口   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!