Dear Antonio,
Thank you for your feedback. I have already tried the NewBmp() method, but unfortunately, it doesn't work as expected in my specific scenario.
What I am doing:
I have 6 buttons btnbmp controls with different gradient-based backgrounds. When the user selects (drags) one of these buttons, I dynamically generate a BMP file on disk that matches the button's gradient style.
The goal:
The user should drag this generated BMP and drop it onto a group of 16 large bitmaps. Upon dropping, the target bitmap receives the color/gradient of the dragged source.
The issue:
DEFINE CURSOR FILE "filename.bmp" fails because, as you explained, it only supports .cur or .ico.
TCursor():NewBmp( oBmp, 0, 0 ) is often unstable or fails to show the cursor correctly depending on the BMP's color depth (24/32 bit) and the lack of a transparency mask.
Using a predefined DRAG cursor is not an option because I need the user to see the specific color/gradient they are dragging.
My request:
Yes, please! I would be very grateful if you could patch cursor.prg to detect the .BMP extension and automatically route it through CreateBmpCursor.
If the class could handle the BMP-to-Cursor conversion internally (generating the necessary mask for Windows), it would make this type of dynamic drag-and-drop UI much easier to implement in FiveWin.
Best regards,
Silvio
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com