I get the mouse position, and the mouse image (icon). but i need one more thing that I can't find anywhere: How Can I get the location of the cursor in the icon that represent the mouse position, mean: every icon of the mouse cursor have diff location, for example the default mouse cursor would be in the 0,0 of the icon, but in the move icon, the cursor would be in the center of the image (icon).
1 Answer
You can use the GetIconInfo() Win32 function (via pinvoke) - this fills out an ICONINFO structure that has fields which provide the x and y hotspot for the cursor.
Note that when this function returns successfully it has also created two GDI bitmap objects, which you are responsible for freeing via DeleteObject().