Thunder93 wrote:Maybe easy.. But I've not seen any posted code using just the PB DragDrop lib and work for Outlook Express.
Not trying to diminish your accomplishment... just meant Express cooperates more in general around these sorts of issues than Outlook does.
Having done some further research, I believe the problem lies in the fact that the recipient drop-target window still has to be registered to accept that specific type of data object (email attachments), in much the same way that is normally done natively within PB via:
Code: Select all
cf_descrip = RegisterClipboardFormat_(#CFSTR_FILEDESCRIPTOR)
EnableWindowDrop(0,cf_descrip,#PB_Drag_Copy)
This code above enables the window to receive attachment-type objects, however also invokes PB's native Drop-Lib to handle all such events. Using srod's code instead to create a custom handler, this step is skipped and the window is never told/registered to handle this obscure non-standard drop-data type. Thus it tries to handle the drag-over, but cannot do so successfully when trying to call QueryGetData, because the window does not "like" the type of data contained therein.
Unfortunately I know of no way to combine these two things, so that the window gets registered to accept Filedescriptor drops, but then also redirected to a custom handler for the actual processing. The regular WinAPI call:
RegisterDragDrop_(WindowID(#Window), *this)
..apparently only registers the window to accept regular, standard drops from the filesystem/explorer exclusively, and nothing else. Those elsewhere on the net who've succeeded in implementing accepts-from-outlook have had to write their own custom DLL file in C++ in order to accomplish this. And that is definitely beyond the scope of my current project/familiarity.
I could be wrong about my hypothesis of course, but that is my best guess based on research done. And as a result of this conclusion, I am giving up on this endeavour altogether. Thanks to everyone who tried to help nonetheless.
EDIT: And, just after typing that and trying one last desperate thing, I made a little bit of progress at last. So it is not quite abandoned just yet...