I am using Embarcadero RAD Studio XE to develop an application. I am trying catch the file(s) drag and drop to the application with the following code
TMainF
in TForm.Create
use two lines
ChangeWindowMessageFilter (WM_DROPFILES, MSGFLT_ADD);
ChangeWindowMessageFilter (WM_COPYGLOBALDATA, MSGFLT_ADD);
that's all
In a plain vanilla application, the code in the question results in WMDropFiles
executing when an object is dropped on the form. So, clearly there's something else happening to stop it working. The most obvious potential causes are:
DragAcceptFiles
.Option 2 seems quite plausible. To learn more see: Q: Why Doesn’t Drag-and-Drop work when my Application is Running Elevated? – A: Mandatory Integrity Control and UIPI