分层 Windows 的系统菜单?
我们在 Delphi 2009 中的分层窗口和系统菜单方面遇到了问题。也就是说,我们的分层窗口(没有边框)没有系统菜单。当我说系统菜单时,我指的是单击应用程序的图标、右键单击其标题栏或(在 Windows 7 中,加上 Shift 键)右键单击任务栏中的应用程序时获得的菜单:
当您尝试访问系统菜单时,例如通过右键单击任务栏图标,此类分层窗口,而是升起分层窗口。这是为什么呢?是否需要设置某种样式,或者处理某种事件?
这是一个匆忙制作的演示,显示了该问题。不过,它确实可以用带有 bsNone borderstyle 的任何形式来重现。
We're having an issue with layered windows and system menus in Delphi 2009. That is, our layered windows (which have no border) have no system menu. When I say system menu, I am referring to the menu you get when clicking an application's icon, right clicking it's title-bar or (in Windows 7, with the addition of the shift key,) right clicking an application in the task-bar:
When you attempt to access the system menu, e.g. by right-clicking on the task-bar icon, of such a layered window, instead the layered window is risen. Why is this? Is there some sort of style to set, or some sort of event to handle?
Here's a hastily made demo showing the issue. It can really be reproduced with any form with a bsNone borderstyle, though.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要重新添加使用
bsNone
边框样式删除的WS_SYSMENU
样式。You need to add back the
WS_SYSMENU
style which is removed withbsNone
border style.