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:
- Custom mouse cursor shadow
- Custom cursor shadow
- Custom cursor with shadow)
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.
精彩评论