This component suite based on The Drag and Drop Component Suite for Delphi from Anders Melander
http://melander.dk/delphi/dragdrop
The Drag and Drop Component Suite Version 5.84 Released 11-nov-2023
© 1997-2010 Anders Melander
© 2011-2023 Sven Harazim
https://github.com/landrix/The-Drag-and-Drop-Component-Suite-for-Delphi
The Drag and Drop Component Suite is a freeware VCL component library that enables your Delphi and C++Builder applications to support COM based drag and drop and integrate with the Windows clipboard.
The drag and drop system that is built into the VCL, is limited in that it only supports drag and drop within the same application. If you need to drag data from your application to other applications (e.g. Word, Explorer or Outlook), or if you need to be able to accept data dropped from other application (e.g. the Explorer), you have to use COM based drag and drop. COM based drag and drop is an integral and very important part of the Windows user interface and the Drag and Drop Component Suite makes it very easy to leverage all the features of COM based drag and drop in your own Delphi and C++Builder applications.
Every drag and drop operation involves two objects: A drop source and a drop target. The drop source provides the data to be dragged, and the drop target accepts the dragged data. Likewise there are basically two sets of components in the Drag and Drop Component Suite; Drop source components and drop target components. Most of the source and target components are specialized to handle just one type of data, but a few of the components supports a wider range of data types or are completely generic.
In addition to the drag and drop components, the Drag and Drop Component Suite also includes components that can be used to build Windows Shell Extensions. While these components aren’t all related to Drag and Drop, they benefit from the Drag and Drop Component Suite framework and allow you to write Windows Shell Extensions with very little code. But most important; I had a lot of fun writing them :-).
This version of the library has been tested with Delphi 6, Delphi 7, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8 (Win32,Win64), Delphi 10 Seattle (Win32,Win64), Delphi 10.1 Berlin (Win32,Win64),Delphi 10.2 Tokyo (Win32,Win64), Delphi 10.3 Rio (Win32,Win64), Delphi 10.4 Sydney (Win32,Win64), Delphi 11, Delphi 12
If you are using a previous version of the Drag and Drop Component Suite, uninstall that version first.
Unzip the package to a folder of your choice.
In the Packages folder, find the design time package that matches your version of Delphi. Open it in Delphi, Compile and Install.
Locate the Library sub-folder that matches your version of Delphi. Add it to the Delphi library search path.
Optional: Add the Source folder to the Delphi browsing path.
Open Delphi and uninstall the Drag and Drop Component Suite design time package.
Remove the Library folder from the Delphi library search path.
Remove the Source folder from the Delphi browsing path.
Locate the folder where you installed The Drag and Drop Component Suite and delete that folder.
When the demo applications are compiled with Delphi 7, some of them will probably emit a lot of "Unsafe type", "Unsafe code" etc. warnings. This doesn't mean that there's anything wrong with the demos. It just means that Borland, at that time, wanted you to know that they were moving to .NET and would like you to do the same (so you can buy the next version of Delphi). You can turn the warnings of in the project options.
Delphi's and C++Builder's HWND and THandle types are not compatible. For this reason it might be nescessary to cast C++Builder's HWND values to Delphi's THandle type when a HWND is passed to a function. E.g.:
if (DragDetectPlus(reinterpret_cast<THandle>(Handle), Point(X, Y))) {
...
}
Virtual File Stream formats can only be pasted from the clipboard with live
data (i.e. FlushClipboard/OleFlushClipboard hasn't been called on the data
source). This problem affects TFileContentsStreamOnDemandClipboardFormat and
the VirtualFileStream demo.
This is believed to be a bug in the Windows clipboard and a work around hasn't
been found yet.
When TDropFileTarget.GetDataOnEnter is set to True, the component doesn't work
with WinZip.
Although the file names are received correctly by TDropFileTarget, WinZip
doesn't extract the files and the files thus can't be copied/moved.
This is caused by a quirk in WinZip; Apparently WinZip doesn't like
IDataObject.GetData to be called before IDropTarget.Drop is called.
The Drag and Drop Component Suite is a freeware VCL component library that enables your Delphi and C++Builder applications to support COM based drag and drop and integrate with the Windows clipboard.
The drag and drop system that is built into the VCL is limited in that it only supports drag and drop within the same application. If you need to drag data from your application to other applications (e.g. Word, Explorer or Outlook), or if you need to be able to accept data dropped from other application (e.g. the Explorer), you have to use COM based drag and drop. COM based drag and drop is an integral and very important part of the Windows user interface and the Drag and Drop Component Suite makes it very easy to leverage all the features of COM based drag and drop in your own Delphi and C++Builder applications.
Every drag and drop operation involves two objects: A drop source and a drop target. The drop source provides the data to be dragged, and the drop target accepts the dragged data.
Likewise there are basically two sets of components in the Drag and Drop Component Suite; Drop source components and drop target components. Most of the source and target components are specialized to handle just one type of data, but a few of the components supports a wider range of data types or are completely generic.
In addition to the drag and drop components, the Drag and Drop Component Suite also includes components that can be used to build Windows Shell Extensions. While these components aren’t all related to Drag and Drop, they benefit from the Drag and Drop Component Suite framework and allow you to write Windows Shell Extensions with very little code. But most important; I had a lot of fun writing them :-).
The Drag and Drop Component Suite contains the following components:
Drop Sources
Drop Targets
Shell Extensions
Additional
Delphinus-Support