In MSVC++ 6.0, I'm designing an application that I want to be able to perform a drag operation on.
I'd like to add code to the OnLButtonDown call which sets up my drag. I'd like to be able to drag
from my application into another application (Paint Shop Pro) and pass a file name, so that PSP will open
the corresponding file name. (Which happens to be a bitmap.)
I've done the same thing under Delphi using a great component someone wrote which implements the DoDragDrop
call, and the descendants of IDataObject, IEnumFormatEtc, and IDropSource to properly handle the CF_HDROP.
I believe that this is the "clean" way to do it. And I could easily translate that code over
(it'd just take a while.)
Before I get too far down this path, I thought I'd ask if someone else has already implemented the same thing,
if there's a simple way I can use the Ole stuff to do the same thing, or if you have a simple API call which
does the same thing.
o In OnLButtonDown
o Create data structures
o Insert a file name
o Execute DoDragDrop
I'm looking for sample source, or a library which takes care of the dirty work for me.