After reading the answer to the Shadow for custom mouse cursor question, I did some testing.
From my Delphi application I loaded both 32bit and 24bit versions of my cursor. Never a shadow. I did the same with the standard Windows arrow pointer. No shadow either.
Also I tried the opposite and assigned my custom cursors to the "Normal select" pointer in the Windows mouse settings. Both the 24bit and 32bit pointer were given a shadow.
So, it appears having an alpha channel in a cursor doesn't influence the shadow behaviour. But what am I doing wrong in my application?
First step is adding the cursor to the application's resources via an .rc file with
CUR_EDGE_R Cursor DISCARDABLE "edge_r.cur"
And in the application it is loaded with:
const
crEdgeR = TCursor(135);
.
.
Screen.Cursors[crEdgeR] := LoadCursor(HInstance, 'CUR_EDGE_R');
So, what is the way to have Windows add a shadow to a custom cursor?
Note: I have seen posts on the internet suggesting to create two version of the mouse cursor, one with and one without shadow, and load the appropriate cursor, depending on the user's settings. This is not the solution I'm looking for.