Win32 API programming
EZY
Prolog -
easy way to write prolog program
Drag and Drop
First you need to declare Win32Api functions responsible for Drag and Drop.
On e_create event in task window include code to activate Drag And Drop:
%BEGIN Task Window, e_Create
task_win_eh(_Win,e_Create(_),0):-
HWND = cast(HWND, _Win),
DragAcceptFiles(HWND,b_true),
win_EnableHook(_Win, b_true),
fail.On e_native event you will do Drag and Drop processing:
%BEGIN Task Window, e_Native
task_win_eh(_Win,e_Native(wm_dropfiles,WParam,_LParam),0):-
collect_dropped_files(WParam,0,FILELIST),
write("FileList \n",FileList),nl,
DragFinish(WParam),
retractall(drag_drop_list(_)),
assert(drag_drop_list(FILELIST)),
% continue processing of the event via e_user
win_sendEvent(_Win,e_user(1,1)),
fail.
%END Task Window, e_Native
Copyright 1998-2000 EDMGROUP (Australia)
Last Updated: August 1, 2002