保持窗口始终位于顶部 - 包括菜单 (win32)
我希望有一个始终位于顶部的分层窗口,我可以实现这一点,但是某些屏幕元素仍然会在其上绘制,例如菜单(包括开始菜单)。
有没有什么方法可以使我的应用程序的窗口或子窗口具有足够高的 topness 属性,以便它将绘制在另一个应用程序的菜单上?或者窗口中是否有内置的东西可以确保当前活动应用程序中的菜单始终绘制在顶部?
事实上,我不太了解菜单是如何工作的。因此,对我来说,尝试让我的窗口“像菜单一样工作”以使其涵盖更多内容可能没有任何意义。
I would like to have a layered window that is always-on-top, which I can accomplish, but there are certain screen elements that still get drawn over it, such as menus (including the start menu).
Is there any way to make a window or child window of my application have a high enough top-ness property that it will draw over another application's menus? Or is there something built in to windows that ensures that menus in the currently active application are always drawn on top?
In fact, I don't really understand all that well how menus work. So it might not even make any sense for me to try to make my window "act like a menu" in hopes of making it cover more things.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
TopMost 只有一个级别,您将与任何其他坚持成为最顶级的程序竞争。例如尝试 osk.exe。我猜它使用 WH_SHELL 钩子来获胜。
There's only one level of TopMost, you'll compete with any other program that insists on being top-most. Try osk.exe for example. I'm guessing it uses a WH_SHELL hook to win.