Hi all, dear Philippe,
for me it would be wonderful if I could simply drag and drop audio files from a webpage (e. g. from sites offering “sfx” and “adlibs” files or other ai stuff like “text to speech”, prepared for this purpose) into e. g. the “Audio Montage” window of Wavelab as well, just as I already can do with files that are located in a local folder on my hard disk.
As a senior windows programmer i can provide you with a short working c++ win32 example how to do, since accepting files from a Webpage via “Drop” event is (in this special scenario) a bit tricky since you can’t use the simple way of DragAcceptFiles(hwnd, TRUE); … case WM_DROPFILES:… in hWnd message loop.
I also can provide the correct javascript code to implement the drag and drop for audio files on such webpages as well.
Would this be a great feature for Wavelab? Is anyone interested ?
Regards,
Martin
.
.
.
Just as a little foretaste:
You’ll have to implement your own “class DropTarget : public IDropTarget”, create “dropTarget” as an instance of that class and use RegisterDragDrop(hWnd, dropTarget); to register your DropTarget class as a callback mechanism for the “Drop” events.
On Windows, Microsoft Edge and Google Chrome-Browser will then offer you an IDataObject pDataObj for your implementation of a Drop function. Btw, the good old CF_HDROP clipboard format was used to transmit a null terminated string as the full path to the dropped file already located in a random %Temp% folder on your local hard drive (e. g. C:\Users<YOUR-USERNAME>\AppData\Local\Temp\chrome_drag_\Audio.wav) which was dropped on your app’s window.*
Perhaps other users also know “the correct way of programming” to handle this special kind of drag and drop audio from a website to Wavelab for Apple macOS?