After reading the answer to the Shadow question for a custom mouse pointer , I did some testing.
From my Delphi application, I downloaded the 32-bit and 24-bit versions of my cursor. Never a shadow. I did the same with the standard Windows arrow pointer. Also there is no shadow.
I also tried the opposite and assigned my custom cursors to the "Normal selection" pointer in the Windows mouse settings. Both the 24-bit and 32-bit pointer got a shadow.
So, it looks like the alpha channel in the cursor does not affect the behavior of the shadow. But what am I doing wrong in my application?
The first step is to add the cursor to the application resources via the .rc file with
CUR_EDGE_R Cursor DISCARDABLE "edge_r.cur"
And in the application it loads:
const crEdgeR = TCursor(135); . . Screen.Cursors[crEdgeR] := LoadCursor(HInstance, 'CUR_EDGE_R');
So how can Windows add a shadow to a user cursor?
Note. I saw messages on the Internet suggesting to create two versions of the mouse cursor, one with one and no shadow, and load the corresponding cursor depending on user settings. This is not the solution I'm looking for.
source share