Hi,
A fairly thorough search on the internet has yielded several old posts about how to accomplish this. The most recent post I found, uses the STD framework, which isn't an option for me so I haven't tried that one but none of the others work. Using PowerBuilder Classic.
All examples basically rely on 2 external functions:
function ulong DragQueryFileA( ulong hDrop, ulong iFile, ref string LPTSTR, ulong cb ) library 'shell32.dll' alias for "DragQueryFileA;Ansi"
subroutine DragAcceptFiles(ulong h, boolean b ) library 'shell32.dll'
Then calling DragAcceptFiles(...) in the open and close events of the window, and calls to DragQueryFileA (...) in a user event mapped to pbm_dropfiles. From my testing, the pbm_dropfiles event never fires when the files are dropped onto the window.
Can anyone provide a current, working example, that simply uses the shell32.dll functions or similar windows API?
Thanks in advance
You should call DragFinish(handle) as last statement in your wm_dropfiles event.
// subroutine DragFinish (long hDrop) library "shell32.dll"
This is to notify Windows you have finished with the drop handle. This frees the resources used to store information about the drop.