readme.txt 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. Drag and Drop Component Suite Version 4.0
  2. Released 18-may-2001
  3. © 1997-2001 Angus Johnson & Anders Melander
  4. -------------------------------------------
  5. Installation:
  6. -------------------------------------------
  7. 1) Before you do anything else, read the "Known problems" section of this
  8. document.
  9. 2) Install the source into a directory of your choice.
  10. The files are installed into three directories:
  11. DragDrop
  12. DragDrop\Components
  13. DragDrop\Demo
  14. 3) Install and compile the appropriate design time package.
  15. The design time packages are located in the Components directory. Each
  16. version of Delphi and C++ Builder has its own package; DragDropD6.dpk for
  17. Delphi 6, DragDropD5.dpk for Delphi 5, DragDropC5.dpk for C++ Builder 5, etc.
  18. 4) Add the Drag and Drop Component Suite components directory to your library
  19. path.
  20. 5) Load the demo project group: demo\dragdrop_delphi.bpg.
  21. The project group contains all the demo applications. There are no demo
  22. applications for C++ Builder at this time.
  23. 6) If your version of Delphi does not support text format DFM files (e.g. Delphi
  24. 4 doesn't), you will have to use the convert.exe utility supplied with Delphi
  25. to convert the demo form files to binary format.
  26. 7) If upgrading from a previous version of the Drag and Drop Component Suite,
  27. please read the document "upgrading_to_v4.txt" before you begin working on
  28. your existing projects.
  29. -------------------------------------------
  30. Getting started:
  31. -------------------------------------------
  32. It is recommended that you start by running each of the demo applications and
  33. then look through the demo source. Each demo application is supplied with a
  34. readme.txt file which briefly describes what the demo does and what features
  35. it uses. The demos should be run in the order in which they are listed in the
  36. supplied project group.
  37. Even if you have used previous versions of the Drag and Drop Component Suite it
  38. would be a good idea to have a quick look at the demos. The library has been
  39. completely rewritten and a lot of new features has been added.
  40. -------------------------------------------
  41. Known problems:
  42. -------------------------------------------
  43. * There appear to be sporadic problems compiling with C++ Builder 5.
  44. Several user have reported that they occasionally get one or more of the
  45. following compiler errors:
  46. [C++ Error] DragDropFile.hpp(178): E2450 Undefined structure
  47. '_FILEDESCRIPTORW'
  48. [C++ Error] DropSource.hpp(135): E2076 Overloadable operator expected
  49. I have not been able to reproduce these errors, but I believe the following
  50. work around will fix the problem: In the project options of *all* projects
  51. which uses these components, add the following conditional define:
  52. NO_WIN32_LEAN_AND_MEAN
  53. The define *must* be made in the project options. It is not sufficient to
  54. #define it in the source.
  55. If you manage to compile with C++ Builder (any version), I would very much
  56. like to know it
  57. -------------------------------------------
  58. Support and feedback:
  59. -------------------------------------------
  60. Since these components are freeware they are also unsupported. You are welcome
  61. to ask for help via email, but I cannot guarantee that I will have time to help
  62. you or even reply to your mail.
  63. You can also try asking for help in the Delphi newsgroups. Since the Drag and
  64. Drop Component Suite is in widespread use, there's a good chance another user
  65. can help you. I would recommend the following newsgroups for issues regarding
  66. this library (or COM based Drag/Drop in general):
  67. borland.public.delphi.winapi
  68. borland.public.delphi.thirdparty-tools
  69. borland.public.delphi.oleautomation
  70. borland.public.cppbuilder.winapi
  71. borland.public.cppbuilder.thirdparty-tools
  72. Please choose the most appropiate newsgroup for your question. Do not cross
  73. post to them all.
  74. If you have suggestions for improvements please mail them to me.
  75. Please include the words Drag Drop in the subject of any email regarding these
  76. components.
  77. -------------------------------------------
  78. Bug reports:
  79. -------------------------------------------
  80. Bugs can either be reported at my home page (http://www.melander.dk/) or mailed
  81. directly to me.
  82. When reporting a bug, please provide the following information:
  83. * The exact version of the Drag and Drop Component Suite you are using.
  84. * The exact version of Delphi or C++ Builder you are using.
  85. * The name and exact version of your operating system (e.g. NT4 SP5).
  86. * The exact version of the Internet Explorer installed on your system.
  87. If you can provide me with a minimal application which reproduces the problem,
  88. I can almost guarantee that I will be able to fix the problem in very short
  89. time. Please supply only the source files (pas, dfm, dpr, dof, res, etc.) and
  90. mail them as a single zip file. If I need a compiled version I will ask for it.
  91. If you mail a bug report to me, please include the words Drag Drop in the
  92. subject of your email.
  93. -------------------------------------------
  94. Upgrades and bug fixes:
  95. -------------------------------------------
  96. Upgrades can be downloaded from my home page:
  97. http://www.melander.dk/delphi/dragdrop/
  98. Bug fixes will also be posted to the above page.
  99. If you have registered for update notification via the installation program, you
  100. will receive email notification when a new release is available. You will not be
  101. notified of bug fixes.
  102. You can use the installation program to check for and download new releases and
  103. to check for known bugs.
  104. Note: If a new release is made available and you are not notified even though
  105. you registered for notification, you probably mistyped your email address during
  106. installation. About 10% of all registrations supply an invalid email address.
  107. -------------------------------------------
  108. Missing in this release:
  109. -------------------------------------------
  110. * Delphi 3 & 4 and C++ Builder support.
  111. Due to time constraints in getting this release ready for inclusion on the
  112. Delphi 6 Companion CD, the release has only been tested with Delphi 5 and
  113. Delphi 6. Support for Delphi 4 and C++ Builder 5 has been planned for the next
  114. release. I have not yet decided if other versions of Delphi and C++ Builder
  115. will be supported.
  116. * On-line help has not been updated and included in the kit due to late changes
  117. in the Delphi 6 help system and lack of time.
  118. If time permits, I will update the help and include it in a future release.
  119. -------------------------------------------
  120. Release history:
  121. -------------------------------------------
  122. 18-may-2001
  123. * ContextMenuDemo and DropHandlerDemo application has been partially
  124. rewritten and renamed.
  125. ContextMenuDemo is now named ContextMenuHandlerShellExt.
  126. DropHandlerDemo is now named DropHandlerShellExt.
  127. * TDropContextMenu component has been rewitten.
  128. The TDropContextMenu now implements a context menu handler shell extension.
  129. In previous releases it implemented a drag drop handler shell extension.
  130. * The DragDropHandler.pas unit which implements the TDropHandler component
  131. has been renamed to DropHandler.pas.
  132. * Added new TDragDropHandler component.
  133. The new component, which lives in the DragDropHandler unit, is used to
  134. implement drag drop handler shell extensions.
  135. * Added DragDropHandlerShellExt demo application.
  136. * Removed misc incomplete demos from kit.
  137. * Fixed minor problem in VirtualFileStream demo which caused drops from
  138. the VirtualFile demo not to transfer content correctly.
  139. * Released as version 4.0.
  140. 11-may-2001
  141. * Converted all demo forms to text DFM format.
  142. This has been nescessary to maintain compatibility between all supported
  143. versions of Delphi.
  144. * Fixed a bug in GetPIDLsFromFilenames which caused drag-link of files (dtLink
  145. with TDropFileSource) not to work.
  146. * Added readme.txt files to some demo applications.
  147. * Added missing tlb and C++ Builder files to install kit.
  148. * Released as FT4.
  149. 6-may-2001
  150. * Added missing dfm files to install kit.
  151. * Tested with Delphi 5.
  152. Fixed Delphi 5 compatibility error in main.dfm of DragDropDemo.
  153. * Removed misc compiler warnings.
  154. * The AsyncTransferTarget and OleObjectDemo demos were incomplete and has been removed
  155. from the kit for the V4.0 release.
  156. The demos will be included in a future release.
  157. * Released as FT3.
  158. 3-may-2001
  159. * Added missing dpr and bpg files to install kit.
  160. * Updated readme.txt with regard to lack of C++ Builder demos.
  161. * Released as FT2.
  162. 29-apr-2001
  163. * Cleaned up for release.
  164. * Released as FT1.
  165. 23-feb-2001
  166. * Modified TCustomDropTarget.FindTarget to handle overlapping targets (e.g.
  167. different targets at the same position but on different pages of a page
  168. control or notebook).
  169. Thanks to Roger Moe for spotting this problem.
  170. 13-feb-2001
  171. * Renamed AsyncTransfer2 demo to AsyncTransferSource.
  172. * Added AsyncTransferTarget demo.
  173. * Replaced TChart in AsyncTransfer2 demo with homegrown pie-chart-thing.
  174. * Modified all IStream based target formats to support incremental transfer.
  175. * URW533 problem has finally been fixed.
  176. The cause of the problem, which is a bug in Delphi, was found by Stefan
  177. Hoffmeister.
  178. * Fixed free notification for TDropContextmenu and TDataFormatAdapter.
  179. 27-dec-2000
  180. * Moved TVirtualFileStreamDataFormat and TFileContentsStreamOnDemandClipboardFormat
  181. classes from VirtualFileStream demo to DragDropFormats unit.
  182. * Added TClipboardFormat.DataFormat and TClipboardFormats.DataFormat property.
  183. * Added TDropEmptySource and TDropEmptyTarget components.
  184. These are basically do-nothing components for use with TDataFormatAdapter.
  185. * Rewritten AsyncTransfer2 demo.
  186. The demo now uses TDropEmptySource, TDataFormatAdapter and
  187. TVirtualFileStreamDataFormat to transfer 10Mb of data with progress
  188. feedback.
  189. * Rewritten VirtualFileStream demo.
  190. The demo now uses TDropEmptySource, TDropEmptyTarget, TDataFormatAdapter and
  191. TVirtualFileStreamDataFormat.
  192. * Fixed memory leak in TVirtualFileStreamDataFormat.
  193. This leak only affected the old VirtualFileStream demo.
  194. * Added support for full File Descriptor attribute set to
  195. TVirtualFileStreamDataFormat.
  196. It is now possible to specify file attributes such as file size and last
  197. modified time in addition to the filename. I plan to add similar features to
  198. the other classes which uses FileDescriptors (e.g. TDropFileSource and
  199. TDropFileTarget).
  200. 21-dec-2000
  201. * Ported to Delphi 4.
  202. * Added workaround for design bug in either Explorer or the clipboard.
  203. Explorer and the clipboard's requirements to the cursor position of an
  204. IStream object are incompatible. Explorer requires the cursor to be at the
  205. beginning of stream and the clipboard requires the cursor to be at the end
  206. of stream.
  207. 15-dec-2000
  208. * Fixed URW533 problem.
  209. I'll leave the description of the workaround in here for now in case the
  210. problem resurfaces.
  211. 11-dec-2000
  212. * Fixed bug in filename to PIDL conversion (GetPIDLsFromFilenames) which
  213. affected TDropFileTarget.
  214. Thanks to Poul Halgaard Jørgensen for reporting this.
  215. 4-dec-2000
  216. * Added THTMLDataFormat.
  217. * Fixed a a few small bugs which affected clipboard operations.
  218. * Added {$ALIGN ON} to dragdrop.inc.
  219. Apparently COM drag/drop requires some structures to be word alligned.
  220. This change fixes problems where some of the demos would suddenly stop
  221. working.
  222. * The URW533 problem has resurfaced.
  223. See the "Known problems" section below.
  224. 13-nov-2000
  225. * TCopyPasteDataFormat has been renamed to TFeedbackDataFormat.
  226. * Added support for the Windows 2000 "TargetCLSID" format with the
  227. TTargetCLSIDClipboardFormat class and the TCustomDropSource.TargetCLSID
  228. property.
  229. * Added support for the "Logical Performed DropEffect" format with the
  230. TLogicalPerformedDropEffectClipboardFormat class. The class is used
  231. internally by TCustomDropSource.
  232. 30-oct-2000
  233. * Added ContextMenu demo and TDropContextMenu component.
  234. Demonstrates how to customize the context menu which are displayed when a
  235. file is dragged with the right mouse button and dropped in the shell.
  236. * Added TCustomDataFormat.GetData.
  237. With the introduction of the GetData method, Data Format classes can now be
  238. used stand-alone to extract data from an IDataObject.
  239. 20-oct-2000
  240. * Added VirtualFileStream demo.
  241. Demonstrates how to use the "File Contents" and "File Group Descritor"
  242. clipboard formats to drag and drop virtual files (files which doesn't exist
  243. physically) and transfer the data on-demand via a stream.
  244. 14-oct-2000
  245. * Added special drop target registration of TCustomRichEdit controls.
  246. TCustomRichEdit needs special attention because it implements its own drop
  247. target handling which prevents it to work with these components.
  248. TCustomDropTarget now disables a rich edit control's built in drag/drop
  249. handling when the control is registered as a drop target.
  250. * Added work around for Windows bug where IDropTarget.DragOver is called
  251. regardless that the drop has been rejected in IDropTarget.DragEnter.
  252. 12-oct-2000
  253. * Fixed bug that caused docking to interfere with drop targets.
  254. Thanks to G. Bradley MacDonald for bringing the problem to my attention.
  255. 30-sep-2000
  256. * The DataFormats property has been made public in the TCustomDropMultiTarget
  257. class.
  258. * Added VirtualFile demo.
  259. Demonstrates how to use the TFileContentsClipboardFormat and
  260. TFileGroupDescritorClipboardFormat formats to drag and drop a virtual file
  261. (a file which doesn't exist physically).
  262. 28-sep-2000
  263. * Improved drop source detection of optimized move.
  264. When an optimized move is performed by a drop target, the drop source's
  265. Execute method will now return drDropMove. Previously drCancel was returned.
  266. The OnAfterDrop event must still be used to determine if a move operation
  267. were optimized or not.
  268. * Modified TCustomDropTarget.GetPreferredDropEffect to get data from the
  269. current IDataObject instead of from the VCL global clipboard.
  270. 18-sep-2000
  271. * Fixed bug in DropComboTarget caused by the 17-sep-2000 TStreams
  272. modification.
  273. 17-sep-2000
  274. * Added AsyncTransfer2 demo to demonstrate use of TDropSourceThread.
  275. * Renamed TStreams class to TStreamList.
  276. 29-aug-2000
  277. * Added TDropSourceThread.
  278. TDropSourceThread is an alternative to Windows 2000 asynchronous data
  279. transfers but also works on other platforms than Windows 2000.
  280. TDropSourceThread is based on code contributed by E. J. Molendijk.
  281. 24-aug-2000
  282. * Added support for Windows 2000 asynchronous data transfers.
  283. Added IAsyncOperation implementation to TCustomDropSource.
  284. Added TCustomDropSource.AllowAsyncTransfer and AsyncTransfer properties.
  285. 5-aug-2000
  286. * Added work around for URW533 compiler bug.
  287. * Fixed D4 and D5 packages and updated a few demos.
  288. Obsolete DropMultiTarget were still referenced a few places.
  289. * Documented work around for C++ Builder 5 compiler error.
  290. See the Known Problems section later in this document for more information.
  291. 2-aug-2000
  292. * The package files provided in the kit is now design-time only packages.
  293. In previous versions, the packages could be used both at design- and
  294. run-time. The change was nescessary because the package now contains
  295. design-time code.
  296. * Added possible work around for suspected C++ Builder bug.
  297. The bug manifests itself as a "Overloadable operator expected" compile
  298. time error. See the "Known problems" section of this document.
  299. * Rewrote CustomFormat1 demo.
  300. * Added CustomFormat2 demo.
  301. * TDataDirection members has been renamed from ddGet and ddSet to ddRead and
  302. ddWrite.
  303. * All File Group Descritor and File Contents clipboard formats has been moved
  304. from the DragDropFile unit to the DragDropFormats unit.
  305. * File Contents support has been added to TTextDataFormat.
  306. The support is currently only enabled for drop sources.
  307. * Renamed TDropMultiTarget component to TDropComboTarget.
  308. Note: This will break applications which uses the TDropMultiTarget
  309. component. You can use the following technique to port application from
  310. previous releases:
  311. 1) Install the new components.
  312. 2) Repeat step 3-8 for all units which uses the TDropMultiTarget component.
  313. 3) Make a backup of the unit (both pas and dfm file) just in case...
  314. 4) Open the unit in the IDE.
  315. 5) In the .pas file, replace all occurances of "TDropMultiTarget" with
  316. "TDropComboTarget".
  317. 6) View the form as text.
  318. 7) Replace all occurances of "TDropMultiTarget" with "TDropComboTarget".
  319. 8) Save the unit.
  320. * Renamed a lot of demo files and directories.
  321. * Added work around for yet another bug in TStreamAdapter.
  322. * Added TCustomStringClipboardFormat as new base class for
  323. TCustomTextClipboardFormat.
  324. This changes the class hierachy a bit for classes which previously
  325. descended from TCustomTextClipboardFormat: All formats which needs zero
  326. termination now descend from TCustomTextClipboardFormat and the rest descend
  327. from TCustomStringClipboardFormat.
  328. Added TrimZeroes property.
  329. Fixed zero termination bug in TCustomTextClipboardFormat and generally
  330. improved handling of zero terminated strings.
  331. Disabled zero trim in TCustomStringClipboardFormat and enabled it in
  332. TCustomTextClipboardFormat.
  333. 23-jul-2000
  334. * Improved handling of long file names in DropHandler demo.
  335. Added work around for ParamStr bug.
  336. * Added TDataFormatAdapter component and adapter demo.
  337. TDataFormatAdapter is used to extend the existing source and target
  338. components with additional data format support without modifying them. It
  339. can be considered an dynamic alternative to the current TDropMultiTarget
  340. component.
  341. 17-jul-2000
  342. * TDropHandler component and DropHandler demo fully functional.
  343. 14-jul-2000
  344. * Tested with C++ Builder 5.
  345. * Fixed sporadic integer overflow bug in DragDetectPlus function.
  346. * Added shell drop handler support with TDropHandler component.
  347. This is a work in progress and is not yet functional.
  348. 1-jul-2000
  349. * Tested with Delphi 4.
  350. * Support for Windows 2000 inter application drag images.
  351. * TRawClipboardFormat and TRawDataFormat classes for support of arbitrary
  352. unknown clipboard formats.
  353. The classes are used internally in the TCustomDropSource.SetData method to
  354. support W2K drag images.
  355. -------------------------------------------
  356. New in version 4.x:
  357. -------------------------------------------
  358. The following are some of the new features in version 4. The list is not
  359. complete.
  360. * Completely redesigned and rewritten.
  361. The new design separates the library into 3 layers:
  362. 1) Clipboard format I/O.
  363. 2) Data conversion and storage.
  364. 3) COM Drag and Drop implementation and VCL component interface.
  365. The first two layers are shared between the source and the target components.
  366. Backward compatibility has been maintained.
  367. Two units are provided for legacy support of custom drag/drop components based
  368. on the V3.x architecture.
  369. * Support for Windows 2000 inter application drag images.
  370. On Windows 2000 drag images are now displayed when dragging between
  371. applications.
  372. * Support for Windows 2000 asynchronous data transfers.
  373. Asynchronous data tranfers allows the drop source and targets to perform slow
  374. transfers or to transfer large amounts of data without blocking the user
  375. interface while the data is being transfered.
  376. For platforms other than Windows 2000, the new TDropSourceThread class can be
  377. used to provide similar (but more limited) asynchronous data transfer
  378. capabilities.
  379. * Support for optimized and non-optimized move.
  380. When performing drag-move operations, it is now possible to specify if the
  381. target (optimized move) or the source (non-optimized move) is responsible for
  382. deleting the source files.
  383. * Support for delete-on-paste.
  384. When data is cut to the clipboard, it is now possible to defer the deletion of
  385. the source data until the target actually pastes the data.
  386. * All formats and components (both source and target) now support clipboard
  387. operations and the VCL clipboard object.
  388. * Support for shell drop handlers.
  389. The new TDropHandler component can be used to write drop handlers. A drop
  390. handler is a shell extension which is executed when a user drags and drops one
  391. or more files on a file associated wth your application.
  392. * Automatic re-registration of targets when the target window handle is
  393. recreated.
  394. In previous versions, target controls would loose their ability to accept
  395. drops when their window handles were recreated by the VCL (e.g. when changing
  396. the border style or docking a form). This is no longer a problem.
  397. * New components:
  398. - TDropComboTarget: Swiss-army-knife target. Accepts text, files, bitmaps,
  399. meta files, URLs and file contents.
  400. - TDropMetaFileTarget: Accepts meta files and enhanced meta files.
  401. - TDropImageTarget: Accepts bitmaps, DIBs, meta files and enhanced meta files.
  402. - TDragDropHandler: Shell Drag Drop Handler target.
  403. - TDropHandler: Shell Drop Handler.
  404. - TDragDropContext: Shell Context Menu Handler.
  405. - TDataFormatAdapter: Extends the standard source and target components with
  406. support for extra data formats. An alternative to TDropComboTarget.
  407. - TDropEmptyTarget and TDropEmptySource: Target and source components which
  408. can be extended with TDataFormatAdapter.
  409. * New clipboard formats:
  410. - File contents stream and storage formats.
  411. - Meta file and enhanced meta file format.
  412. - Netscape Bookmark format.
  413. - Netscape image format.
  414. - V-Card format.
  415. - HTML format.
  416. - RFC822 email format.
  417. - RTF, Unicode, OEM and CSV text formats.
  418. - Locale format.
  419. - Others...
  420. * New source events:
  421. - OnGetData: Fired when the target requests data.
  422. - OnSetData: Fired when the target writes data back to the source.
  423. - OnPaste: Fired when the target pastes data which the source has placed on
  424. the clipboard.
  425. - OnAfterDrop: Fired after the drag/drop operation has completed.
  426. * New target events:
  427. - OnScroll: Fires when the target component is about to perform auto-scroll on
  428. the target control.
  429. - OnAcceptFormat: Fires when the target component needs to determine if it
  430. will accept a given data format. Only surfaced in the TDropComboTarget
  431. component.
  432. * 7 new demo applications.
  433. * Support for run-time definition of custom drag formats.
  434. You can now add support for new clipboard formats without custom components.
  435. * Support for design-time extension of existing source and target components.
  436. Using the new TDataFormatAdapter component it is now possible to mix and match
  437. data formats and source and target components at design time. E.g. the
  438. TDropFileTarget component can be extended with URL support.
  439. * It is now possible to completely customize the target auto-scroll feature.
  440. Auto scroling can now be completely customized via the OnDragEnter,
  441. OnDragOver, OnGetDropEffect and OnScroll events and the public NoScrollZone
  442. and published AutoScroll properties.
  443. * Multiple target controls per drop target component.
  444. In previous versions you had to use one drop target component per target
  445. control. With version 4, each drop target component can handle any number of
  446. target controls.
  447. * It is now possible to specify the target control at design time.
  448. A published Target property has been added to the drop target components.
  449. -------------------------------------------
  450. TODO (may or may not be implemented):
  451. -------------------------------------------
  452. * Async transfer demo (with and without IAsyncOperation support).
  453. * Scrap file demo.
  454. * Outlook message format.
  455. * Structured storage support (IStorage encapsulation).