The WM_DROPFILES seems very easy to handle file drag and drop. But it always changes the cursor to crDrag at the start of hovering. The WM_DROPFILES handler activated just by the drop event. It is problematic if the user want to drag a file over the form with an unsupported extension.
How can I change the cursor depending on the file extensions during dragging?
It should set to crNoDrop if none of the files has an acceptable extension.
I wrote this filtering function and it works fine:
function isAcceptableFileName(fileName_ : string; fileExts_ : array of string ) : boolean
I use Delphi 10.3.