MIAMEX function MX_DRAGDROP (199) provides support for accepting files that are dragged and dropped onto a static text control.
xcall MIAMEX, MX_DRAGDROP, opcode, status, ctlid {,fidx ,fspec}
To enable the feature, specify the WS_EX_ACCEPTFILES (&h0010) flag in the winstylex parameter of the AUI_CONTROL call when creating the static control. The control should probably have a colored background, or some kind of border to make it recognizable, along with some text identifying it as a target, e.g. "Drop files here".
When a file or group of files is dragged from an Explorer window and dropped on the target control, exitcode -75 is generated. The A-Shell application can then respond with the MX_DRAGDROP (199) function.
Parameters
opcode (Num) [in]
0: query drop buffer, return number of files in status parameter; 1: retrieve fspec corresponding to fidx ; 2: clear drop buffer
status (Signed Num) [out]
<=0: failure, or no files available in opcode 0; >0: success =number of files for opcode 0, number of bytes in fspec for opcode 1
ctlid (String) [in]
control id of the target control
fidx (Num) [in]
for opcode 1, must be set to the number of the fspec to retrieve
fspec (String) [out]
file specification returned for opcode 1
Comments
Each drag/drop operation replaces the previous buffer, similar to the way the Windows clipboard works. So the only way for the buffer to contain multiple filespecs is to drag multiple files in one operation.
Although the implementation is primarily on the Windows side, accessing the new MX_DRAGDROP feature from an ATE session will require that the server instance of A-Shell also be at least at this version level.
See sample program FILEDROP1.