自定义鼠标光标的阴影
在“较新”的 Windows 系统上,有一个选项可以让操作系统在鼠标光标下方绘制阴影:
然而,即使启用此设置,我的 Delphi 应用程序中的自定义光标也不会显示阴影。您知道如何安排它以便 Windows 自动添加阴影吗?或者我真的必须检查用户的偏好并有条件地自己绘制阴影,例如 迈克·利施克做到了?
(这个问题已经困扰我和其他人一段时间了:
On "newer" Windows systems there is an option to make the OS draw a shadow beneath the mouse cursor:
However the custom cursors in my Delphi app don't show a shadow even if this setting is enabled. Do you have any idea how to arrange it so that Windows adds the shadow automagically? Or do I really have to check the user's preferences and conditionally draw the shadow myself like Mike Lischke did?
(This is a question that has been bugging me and others for some time:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,您不需要检查用户的全局设置并自己绘制光标。您只需提供带有 Alpha 通道的光标即可。 Windows 将使用 alpha 混合来绘制光标,也可能不使用,具体取决于用户的设置。您的光标可能不包含 Alpha 通道,因此阴影永远不会显示。
No, you don't need to check the user's global setting and draw the cursor yourself. You just need to provide a cursor with the alpha channel. Windows will either use alpha blending to draw your cursor or not, depending on the user's setting. Your cursors probably don't include the alpha channel so the shadow is never shown.