且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

自定义鼠标光标的阴影

更新时间:2023-11-26 23:49:34

不,你不需要检查用户的全局设置和自己绘制光标。你只需要提供一个带有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.