TMyOLEDragDropInterface - a simple wrapper component to implement
OLE Drag and Drop.

Copyright 1998 by Andreas Hahn
andreas.hahn@sap-ag.de

Free to use, edit and redistribute as long as my name appears somewhere
in the source code.
No warranty is given by the author, expressed or limited.
(this was for our american friends ;-)

Comments, bug-reports etc are welcome. I would be glad if you drop me a
line when modifying the source to keep track of the code history.

What it is :

TMyOLEDragDropInterface is an invisible, unregistered component (I am too
lazy to make it work from the component palette at the moment, but that's
why it is Release 0.9) that has to be created manually at runtime. It
encapsulates the OLE Drap/Drop interfaces and can be attached to any
windowed control. You can restrict the drag/drop effects like copy, move
and link. The behaviour of function keys during the drag process is system
standard (move my default, CTRL copies, SHIFT-CTRL links, ESC cancels).
The wrapper components only accepts drag objects with the same private
clipboard format (defined in the DropWrap unit), wich can be extended in
the enumerator object (like dropping files from Explorer). The data
transfer is only a string at the moment, but can be easily extended
(e.g. streaming a component). If you do that, please modify the clipboard
format string to ensure proper functionality with unmodified releases.
OK, I think that's it. If you have any implementation ideas, drop me
a line.

Usage :

I included a sample project. The main points are:
- Create the component in the FomrCreate event
- Assign the DragDropControl (wich has to be a descendant of TWinControl)
  in the FormShow event to make sure the window handle for the control
  is existant
- Assign the OnDrop and OnDragFinished events to your event handlers
- Include your own drag-detector handler in the controls MouseMove event
  and initiate the OLE-drag with the StartDrag method

About the sample project :

To see the real benefit of OLE Drag and Drop, compile the project and start
multiple instances of it from Explorer. You can drag/drop between all
instances (inter-process). Play around with the checkboxes.

History :

V0.9 created, initial release                                    01-31-1998
V1.0 Invisible component, several clipboard formats, etc.        ??????????
     (depends on your feedback !)
     

