TDragDrop.htm 91 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type"
  4. content="text/html; charset=iso-8859-1">
  5. <meta name="AUTHOR" content="Dieter Steinwedel">
  6. <meta name="DESCRIPTION"
  7. content="Drag&amp;Drop component for Delphi; description for TDragDrop">
  8. <meta name="KEYWORDS"
  9. content="delphi, drag, drop, component, ole, com, freeware, windows">
  10. <meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
  11. <title>Details about TDragDrop</title>
  12. </head>
  13. <body bgcolor="#FFFFEF">
  14. <table border="0" cellspacing="0" width="600" bgcolor="#008080">
  15. <tr>
  16. <td width="10">&nbsp;</td>
  17. <td width="580">&nbsp; </td>
  18. <td width="10" bgcolor="#FFFFEF">&nbsp;</td>
  19. </tr>
  20. <tr>
  21. <td>&nbsp;</td>
  22. <td><p align="center"><font color="#FFFFFF" size="7"
  23. face="Arial">TDragDrop</font></p>
  24. </td>
  25. <td>&nbsp;</td>
  26. </tr>
  27. <tr>
  28. <td bgcolor="#FFFFEF">&nbsp;</td>
  29. <td>&nbsp;</td>
  30. <td>&nbsp;</td>
  31. </tr>
  32. </table>
  33. <p align="left">&nbsp;</p>
  34. <p align="left">&nbsp;</p>
  35. <table border="0" width="600">
  36. <tr>
  37. <td width="10" bgcolor="#008080" height="10">&nbsp; </td>
  38. <td rowspan="2" width="590"><font size="5" face="Arial">Description</font></td>
  39. </tr>
  40. <tr>
  41. <td>&nbsp;</td>
  42. </tr>
  43. <tr>
  44. <td>&nbsp;</td>
  45. <td><font face="Arial"><b><i>TDragDrop</i></b> is a
  46. component for COM/OLE based drag&amp;drop operations. The
  47. component is able to make child-classes of TWinControl
  48. (e.g. TEdit, TMemo, TListView, etc.) to be the source AND
  49. target of drag&amp;drop operations.</font><p><font
  50. face="Arial">Normally, you only use this component
  51. directly (for testing), if you develop an own
  52. drag&amp;drop component based on this class.</font></p>
  53. </td>
  54. </tr>
  55. <tr>
  56. <td height="50">&nbsp;</td>
  57. <td>&nbsp;</td>
  58. </tr>
  59. </table>
  60. <table border="0" width="600">
  61. <tr>
  62. <td width="10" bgcolor="#008080" height="10">&nbsp; </td>
  63. <td rowspan="2" width="590"><font size="5" face="Arial">Important
  64. for Use</font></td>
  65. </tr>
  66. <tr>
  67. <td>&nbsp;</td>
  68. </tr>
  69. <tr>
  70. <td>&nbsp;</td>
  71. <td><font face="Arial">This </font><a href="Index.htm"><font
  72. face="Arial">file</font></a><font face="Arial">
  73. (index.htm) contains more information about restrictions,
  74. the disclaimer, remarks etc.</font></td>
  75. </tr>
  76. <tr>
  77. <td height="50">&nbsp;</td>
  78. <td>&nbsp;</td>
  79. </tr>
  80. </table>
  81. <table border="0" width="600">
  82. <tr>
  83. <td width="10" bgcolor="#008080" height="10">&nbsp; </td>
  84. <td rowspan="2" width="590"><font size="5" face="Arial">History</font></td>
  85. </tr>
  86. <tr>
  87. <td>&nbsp;</td>
  88. </tr>
  89. <tr>
  90. <td>&nbsp;</td>
  91. <td><font face="Arial"><b>Version 4.30</b> </font><font
  92. color="#808080" face="Arial">published on 17-Dec-1999</font></td>
  93. </tr>
  94. <tr>
  95. <td>&nbsp;</td>
  96. <td><ul>
  97. <li><font face="Arial">The method <strong>DropHandler</strong>
  98. was added</font></li>
  99. <li><font face="Arial">The implementation of the
  100. context-menu has changed; now you can insert
  101. custom menuitems</font></li>
  102. </ul>
  103. </td>
  104. </tr>
  105. <tr>
  106. <td>&nbsp;</td>
  107. <td><font face="Arial"><b>Version 4.20</b> </font><font
  108. color="#808080" face="Arial">published on 13-Nov-1999</font></td>
  109. </tr>
  110. <tr>
  111. <td>&nbsp;</td>
  112. <td><ul>
  113. <li><font color="#FF0000" face="Arial"><strong>IMPORTANT:</strong></font><font
  114. face="Arial"><strong> </strong>The mouse
  115. coordinates <em><strong>pt </strong></em>in <em><strong>OnDragEnter,
  116. OnDragOver, OnDrop, OnDragDetect,
  117. OnprocessDropped</strong></em> and <em><strong>OnBeforeScrolling</strong></em>
  118. are not a longer absolute to the screen but
  119. relative to the <em><strong>DragDropControl</strong></em>;
  120. maybe, that you must adjust your code</font></li>
  121. </ul>
  122. </td>
  123. </tr>
  124. <tr>
  125. <td>&nbsp;</td>
  126. <td><font face="Arial"><b>Version 4.10</b> </font><font
  127. color="#808080" face="Arial">published on 06-Jul-1999</font></td>
  128. </tr>
  129. <tr>
  130. <td>&nbsp;</td>
  131. <td><ul>
  132. <li><font face="Arial">Bug with <b><i>AcceptOwnDnD</i></b>
  133. fixed </font></li>
  134. <li><font face="Arial">The handling of the clipboard
  135. has totally changed. As result of it, the
  136. implemention of the method <b><i>Execute</i></b>
  137. has changed, but not the using. You won't notice
  138. the modification (and haven't to change code),
  139. unless you haven't created your own classes based
  140. on <b><i>TDragDrop</i></b>. </font><p><font
  141. face="Arial"><i>Following is only important, if
  142. you've build your own class based on </i><b><i>TDragDrop</i></b>:</font></p>
  143. <p><font face="Arial">Normally you create a data
  144. object in the method <b><i>Execute</i></b> before
  145. data is dragged. Simply move this code to the new
  146. method <b><i>CreateDataObject</i></b>, inherited
  147. from <b><i>TDragDrop</i></b> and your class are
  148. compatible with this version. As a result of
  149. this, the your child-class has automaticly the
  150. capability for clipboard operations without any
  151. additonal code for this in contrast to earlier
  152. times. So, the expenditure for child-class
  153. development has shrinked. Fine, or? </font></p>
  154. </li>
  155. </ul>
  156. </td>
  157. </tr>
  158. <tr>
  159. <td>&nbsp;</td>
  160. <td><font face="Arial"><b>Version 4.00</b> </font><font
  161. color="#808080" face="Arial">published on 30-May-1999</font></td>
  162. </tr>
  163. <tr>
  164. <td>&nbsp;</td>
  165. <td><ul>
  166. <li><font face="Arial"><b><i>OnDragDetect</i></b> was
  167. changed in the declaration; now it isn't so long
  168. any more </font></li>
  169. <li><font face="Arial">The available drag effects in <b><i>SourceEffects</i></b>
  170. and <b><i>TargetEffects</i></b> were corrected </font></li>
  171. <li><font face="Arial">The scroll cursors during
  172. d&amp;d are now displayed </font></li>
  173. <li><font face="Arial">New great properties added: <b><i>ScrollDetectOptions</i></b>
  174. and <b><i>SourceCompatibility</i></b> </font></li>
  175. <li><font face="Arial">New design for the
  176. auto-detection for drag&amp;drop</font></li>
  177. </ul>
  178. </td>
  179. </tr>
  180. <tr>
  181. <td>&nbsp;</td>
  182. <td><font face="Arial"><b>Version 3.20</b> </font><font
  183. color="#808080" face="Arial">published on 3-May-1999</font></td>
  184. </tr>
  185. <tr>
  186. <td>&nbsp;</td>
  187. <td><ul>
  188. <li><font face="Arial">Property <b><i>RenderOn</i></b>
  189. extended with a new value </font></li>
  190. <li><font face="Arial">The bug with source &amp;
  191. target effects in version 3.11 wasn't fixed in
  192. the Delphi4 component; this is now made up </font></li>
  193. <li><font face="Arial">The documentation is completed
  194. (for a longer time, there are the properties <b><i>CHCopy</i></b>,
  195. <b><i>CHMove</i></b>, <b><i>CHLink</i></b> etc.
  196. available) </font></li>
  197. <li><font face="Arial">Bug was fixed with <b><i>DragOver</i></b>
  198. (modifications of the <b><i>dwEffect</i></b> has
  199. no effect, if the target doesn't accept the data)
  200. </font></li>
  201. <li><font face="Arial">Some bugs with the
  202. auto-detection for drag&amp;drop fixed (the
  203. component sends now always a
  204. &quot;mousebutton-up&quot; message, after a
  205. dectection has started; the detection had not
  206. worked, if the start position was near to the
  207. border of the visual control)</font> </li>
  208. </ul>
  209. </td>
  210. </tr>
  211. <tr>
  212. <td>&nbsp;</td>
  213. <td><font face="Arial"><b>Version 3.11</b> </font><font
  214. color="#808080" face="Arial">published on 27-Feb-1999</font></td>
  215. </tr>
  216. <tr>
  217. <td>&nbsp;</td>
  218. <td><ul>
  219. <li><font face="Arial">Property <b><i>RenderOn</i></b>
  220. extended with new values </font></li>
  221. <li><font face="Arial">New property: <b><i>AvailableDropEffects</i></b>
  222. </font></li>
  223. <li><font face="Arial">Bug fixed with source &amp;
  224. target effects (mostly invisible) </font></li>
  225. <li><font face="Arial">In the Delphi2 version: unused
  226. method (<b><i>SetTargetWindowControl</i></b>)
  227. deleted (relict from an earlier time) </font></li>
  228. <li><font face="Arial"><b><i>SetDragDropControl</i></b>
  229. corrected (you can change now the DragDropControl
  230. at run-time, if you need)</font> </li>
  231. </ul>
  232. </td>
  233. </tr>
  234. <tr>
  235. <td>&nbsp;</td>
  236. <td><font face="Arial"><b>Version 3.10</b> </font><font
  237. color="#808080" face="Arial">published on 19-Jan-1999</font></td>
  238. </tr>
  239. <tr>
  240. <td>&nbsp;</td>
  241. <td><ul>
  242. <li><font face="Arial">Range-Check Error fixed in <b><i>Execute</i></b>
  243. </font></li>
  244. <li><a href="#WinNTBug1"><font face="Arial">Bug</font></a><font
  245. face="Arial"> in WinNT4 detected </font></li>
  246. <li><font face="Arial">Bug in detecting the language
  247. fixed </font></li>
  248. <li><font face="Arial">The property <b><i>RenderAsync</i></b>
  249. was replaced by the new property <b><i>RenderOn</i></b>
  250. </font></li>
  251. <li><font face="Arial">Bug fixed: You don't need any
  252. longer enable even the target effects to make
  253. your <b><i>DragDropControl</i></b> able to be the
  254. source of d&amp;d operations </font></li>
  255. <li><font face="Arial">Bug fixed: Modifications of
  256. the drop effect <b><i>dwEffect</i></b> in the
  257. event-handlers <b><i>OnXXXXX</i></b> effects even
  258. to the drop</font> </li>
  259. </ul>
  260. </td>
  261. </tr>
  262. <tr>
  263. <td>&nbsp;</td>
  264. <td><font face="Arial"><b>Version 3.00</b> </font><font
  265. color="#808080" face="Arial">updated on 31-Nov-1998</font></td>
  266. </tr>
  267. <tr>
  268. <td>&nbsp;</td>
  269. <td><ul>
  270. <li><font face="Arial">Native version for Delphi4
  271. available </font></li>
  272. <li><font face="Arial">Some bugs fixed </font></li>
  273. <li><font face="Arial">Polish version available </font></li>
  274. <li><font face="Arial">Paramters to the event <b><i>OnProcessDropped</i></b>
  275. and <b><i>OnDragDetect</i></b> added </font></li>
  276. <li><font face="Arial"><b><i>ExecuteDragDrop</i></b>
  277. renamed to <b><i>Execute</i></b> </font></li>
  278. <li><font face="Arial"><b><i>Execute</i></b> has new
  279. result values </font></li>
  280. <li><font face="Arial">The drop effects were renamed </font></li>
  281. <li><font face="Arial">Sorry for so heavy code
  282. breaking, but in my opinion, there was the
  283. necessity to change these things</font> </li>
  284. </ul>
  285. </td>
  286. </tr>
  287. <tr>
  288. <td>&nbsp;</td>
  289. <td><font face="Arial"><b>Version 2.01</b> </font><font
  290. color="#808080" face="Arial">published on 03-Oct-1998</font></td>
  291. </tr>
  292. <tr>
  293. <td>&nbsp;</td>
  294. <td><ul>
  295. <li><font face="Arial">Language auto-detect feature
  296. added </font></li>
  297. <li><font face="Arial">Some bugs fixed</font> </li>
  298. </ul>
  299. </td>
  300. </tr>
  301. <tr>
  302. <td>&nbsp;</td>
  303. <td><font face="Arial"><b>Version 2.00</b></font><font
  304. color="#808080" face="Arial"> updated on 03-Oct-1998</font></td>
  305. </tr>
  306. <tr>
  307. <td>&nbsp;</td>
  308. <td><ul>
  309. <li><font face="Arial">New methods &amp; properties
  310. (clipboard actions, drag detect, etc.) </font></li>
  311. <li><font face="Arial">The use of the COM was
  312. corrected (ref-counter, etc.)</font> </li>
  313. </ul>
  314. </td>
  315. </tr>
  316. <tr>
  317. <td>&nbsp;</td>
  318. <td><font face="Arial"><b>Version 1.01</b></font><font
  319. color="#808080" face="Arial"> published on 12-Aug-1998</font></td>
  320. </tr>
  321. <tr>
  322. <td>&nbsp;</td>
  323. <td><ul>
  324. <li><font face="Arial">Some small updates</font></li>
  325. </ul>
  326. </td>
  327. </tr>
  328. <tr>
  329. <td>&nbsp;</td>
  330. <td><font face="Arial"><b>Version 1.00</b> </font><font
  331. color="#808080" face="Arial">published on 06-Aug-1998</font><font
  332. face="Arial"> </font></td>
  333. </tr>
  334. <tr>
  335. <td>&nbsp;</td>
  336. <td><ul>
  337. <li><font face="Arial">First official release</font></li>
  338. </ul>
  339. </td>
  340. </tr>
  341. <tr>
  342. <td height="50">&nbsp;</td>
  343. <td colspan="2">&nbsp;</td>
  344. </tr>
  345. </table>
  346. <table border="0" width="600">
  347. <tr>
  348. <td width="10" bgcolor="#008080" height="10">&nbsp; </td>
  349. <td rowspan="2" width="590"><font size="5" face="Arial">Properties</font></td>
  350. </tr>
  351. <tr>
  352. <td>&nbsp;</td>
  353. </tr>
  354. </table>
  355. <table border="0" cellpadding="3" cellspacing="0" width="600">
  356. <tr>
  357. <td width="10">&nbsp;</td>
  358. <td bgcolor="#008080"><a name="AcceptOwnDnD"><font
  359. color="#FFFFFF" size="5" face="Arial"><b>AcceptOwnDnD</b></font></a><font
  360. color="#FFFFFF" size="4" face="Arial"><b><i> </i></b></font><font
  361. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  362. </tr>
  363. <tr>
  364. <td rowspan="2">&nbsp;</td>
  365. <td bgcolor="#FFFFCC"><font size="3" face="Arial">If<b> </b>your<b>
  366. </b></font><a href="#DragDropControl"><font size="3"
  367. face="Arial"><b><i>DragDropControl</i></b></font></a><font
  368. size="3" face="Arial"> is configured to be source AND
  369. target of drag&amp;drop operations you can determine
  370. here, if your </font><a href="#DragDropControl"><font
  371. size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  372. size="3" face="Arial"> should accept its own
  373. drag&amp;drop operation. This is important in example, if
  374. you want to change the order of Listbox items using this
  375. component and not the internal drag&amp;drop operations. </font></td>
  376. </tr>
  377. <tr>
  378. <td bgcolor="#FFFFEF">&nbsp;</td>
  379. </tr>
  380. <tr>
  381. <td>&nbsp;</td>
  382. <td bgcolor="#008080"><a name="AutoDetectDnD"><font
  383. color="#FFFFFF" size="5" face="Arial"><b>AutoDetectDnD</b></font><font
  384. size="3" face="Arial"><b> </b></font><font
  385. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></a></td>
  386. </tr>
  387. <tr>
  388. <td rowspan="2">&nbsp;</td>
  389. <td bgcolor="#FFFFCC"><font size="3" face="Arial">If<b> </b>your<b>
  390. </b></font><a href="#DragDropControl"><font size="3"
  391. face="Arial"><b><i>DragDropControl</i></b></font></a><font
  392. size="3" face="Arial"> is configured to be source of
  393. drag&amp;drop operations you can define here, if this
  394. component should detect drag operations or not. The
  395. property </font><a href="#DragDetectDelta"><font size="3"
  396. face="Arial"><b><i>DragDetectDelta</i></b></font></a><font
  397. size="3" face="Arial"> is involved in the detection.</font>
  398. <p><font color="#FF0000" size="3" face="Arial"><strong>IMPORTANT:</strong></font><font
  399. size="3" face="Arial"> If you use the drag-detection,
  400. it's high recommended to check the section &quot;</font><a
  401. href="#DragDetectionProblem"><font size="3" face="Arial">Problems
  402. With The Drag-Detection</font></a><font size="3"
  403. face="Arial">&quot;.</font></p>
  404. </td>
  405. </tr>
  406. <tr>
  407. <td bgcolor="#FFFFEF">&nbsp;</td>
  408. </tr>
  409. <tr>
  410. <td>&nbsp;</td>
  411. <td bgcolor="#008080"><font color="#FFFFFF" size="5"
  412. face="Arial"><b>BringToFront</b></font><font size="3"
  413. face="Arial"><b> </b></font><font color="#FFFF80"
  414. size="3" face="Arial"><b><i>published</i></b></font></td>
  415. </tr>
  416. <tr>
  417. <td rowspan="2">&nbsp;</td>
  418. <td bgcolor="#FFFFCC"><font size="3" face="Arial">If the
  419. user has dropped data on the target control, you can
  420. determine here if the form should come to front after the
  421. drag&amp;drop operation or not. </font></td>
  422. </tr>
  423. <tr>
  424. <td bgcolor="#FFFFEF">&nbsp;</td>
  425. </tr>
  426. <tr>
  427. <td>&nbsp;</td>
  428. <td bgcolor="#008080"><font color="#FFFFFF" size="5"
  429. face="Arial"><b>CHCopy</b></font><font size="3"
  430. face="Arial"><b> </b></font><font color="#FFFF80"
  431. size="3" face="Arial"><b><i>public</i></b></font></td>
  432. </tr>
  433. <tr>
  434. <td rowspan="2">&nbsp;</td>
  435. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Use
  436. this property to set a custom cursor for the copy-effect
  437. during drag&amp;drop. </font></td>
  438. </tr>
  439. <tr>
  440. <td bgcolor="#FFFFEF">&nbsp;</td>
  441. </tr>
  442. <tr>
  443. <td>&nbsp;</td>
  444. <td bgcolor="#008080"><font color="#FFFFFF" size="5"
  445. face="Arial"><b>CHLink</b></font><font size="3"
  446. face="Arial"><b> </b></font><font color="#FFFF80"
  447. size="3" face="Arial"><b><i>public</i></b></font></td>
  448. </tr>
  449. <tr>
  450. <td rowspan="2">&nbsp;</td>
  451. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Use
  452. this property to set a custom cursor for the link-effect
  453. during drag&amp;drop. </font></td>
  454. </tr>
  455. <tr>
  456. <td bgcolor="#FFFFEF">&nbsp;</td>
  457. </tr>
  458. <tr>
  459. <td>&nbsp;</td>
  460. <td bgcolor="#008080"><font color="#FFFFFF" size="5"
  461. face="Arial"><b>CHMove</b></font><font size="3"
  462. face="Arial"><b> </b></font><font color="#FFFF80"
  463. size="3" face="Arial"><b><i>public</i></b></font></td>
  464. </tr>
  465. <tr>
  466. <td rowspan="2">&nbsp;</td>
  467. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Use
  468. this property to set a custom cursor for the move-effect
  469. during drag&amp;drop. </font></td>
  470. </tr>
  471. <tr>
  472. <td bgcolor="#FFFFEF">&nbsp;</td>
  473. </tr>
  474. <tr>
  475. <td>&nbsp;</td>
  476. <td bgcolor="#008080"><font color="#FFFFFF" size="5"
  477. face="Arial"><b>CHScrollCopy</b></font><font size="3"
  478. face="Arial"><b> </b></font><font color="#FFFF80"
  479. size="3" face="Arial"><b><i>public</i></b></font></td>
  480. </tr>
  481. <tr>
  482. <td rowspan="2">&nbsp;</td>
  483. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Use
  484. this property to set a custom cursor for the copy-effect
  485. during drag&amp;drop </font><font face="Arial">and
  486. scrolling in the target window. </font></td>
  487. </tr>
  488. <tr>
  489. <td bgcolor="#FFFFEF">&nbsp;</td>
  490. </tr>
  491. <tr>
  492. <td>&nbsp;</td>
  493. <td bgcolor="#008080"><font color="#FFFFFF" size="5"
  494. face="Arial"><b>CHScrollLink</b></font><font size="3"
  495. face="Arial"><b> </b></font><font color="#FFFF80"
  496. size="3" face="Arial"><b><i>public</i></b></font></td>
  497. </tr>
  498. <tr>
  499. <td rowspan="2">&nbsp;</td>
  500. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Use
  501. this property to set a custom cursor for the link-effect
  502. during drag&amp;drop </font><font face="Arial">and
  503. scrolling in the target window. </font></td>
  504. </tr>
  505. <tr>
  506. <td bgcolor="#FFFFEF">&nbsp;</td>
  507. </tr>
  508. <tr>
  509. <td>&nbsp;</td>
  510. <td bgcolor="#008080"><font color="#FFFFFF" size="5"
  511. face="Arial"><b>CHScrollMove</b></font><font size="3"
  512. face="Arial"><b> </b></font><font color="#FFFF80"
  513. size="3" face="Arial"><b><i>public</i></b></font></td>
  514. </tr>
  515. <tr>
  516. <td rowspan="2">&nbsp;</td>
  517. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Use
  518. this property to set a custom cursor for the move-effect
  519. during drag&amp;drop </font><font face="Arial">and
  520. scrolling in the target window. </font></td>
  521. </tr>
  522. <tr>
  523. <td bgcolor="#FFFFEF">&nbsp;</td>
  524. </tr>
  525. <tr>
  526. <td>&nbsp;</td>
  527. <td bgcolor="#008080"><a name="DragDetectDelta"><font
  528. color="#FFFFFF" size="5" face="Arial"><b>DragDetectDelta</b></font></a><font
  529. size="5" face="Arial"><b> </b></font><font
  530. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  531. </tr>
  532. <tr>
  533. <td rowspan="2">&nbsp;</td>
  534. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Is the
  535. drag detection enabled by<b> </b></font><a
  536. href="#AutoDetectDnD"><font size="3" face="Arial"><b><i>AutoDetectDnD</i></b></font></a><font
  537. size="3" face="Arial"> or calling </font><a
  538. href="#StartDnDDetection"><font size="3" face="Arial"><b><i>StartDnDDetection</i></b></font></a><font
  539. size="3" face="Arial">, the drag detection was
  540. successful, if the mouse was moved over more than in this
  541. property defined pixels. </font></td>
  542. </tr>
  543. <tr>
  544. <td bgcolor="#FFFFEF">&nbsp;</td>
  545. </tr>
  546. <tr>
  547. <td>&nbsp;</td>
  548. <td bgcolor="#008080"><a name="DragDropControl"><font
  549. color="#FFFFFF" size="5" face="Arial"><b>DragDropControl</b></font></a><font
  550. size="3" face="Arial"><b> </b></font><font
  551. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  552. </tr>
  553. <tr>
  554. <td rowspan="2">&nbsp;</td>
  555. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Choose
  556. here a component like Listbox etc. that should be handled
  557. as source and target for drag&amp;drop operations.</font>
  558. <p><font color="#FF0000" size="3" face="Arial"><strong>IMPORTANT:</strong></font><font
  559. size="3" face="Arial"> If you use the drag-detection,
  560. it's high recommended to check the section &quot;</font><a
  561. href="#DragDetectionProblem"><font size="3" face="Arial">Problems
  562. With The Drag-Detection</font></a><font size="3"
  563. face="Arial">&quot;.</font></p>
  564. </td>
  565. </tr>
  566. <tr>
  567. <td bgcolor="#FFFFEF">&nbsp;</td>
  568. </tr>
  569. <tr>
  570. <td>&nbsp;</td>
  571. <td bgcolor="#008080"><font color="#FFFFFF" size="5"
  572. face="Arial"><b>OwnerIsSource</b></font><font size="3"
  573. face="Arial"><b> </b></font><font color="#FFFF80"
  574. size="3" face="Arial"><b><i>public, read-only</i></b></font></td>
  575. </tr>
  576. <tr>
  577. <td rowspan="2">&nbsp;</td>
  578. <td bgcolor="#FFFFCC"><font size="3" face="Arial">This
  579. property indicates during a drag&amp;drop operation, if
  580. the<b> </b></font><a href="#DragDropControl"><font
  581. size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  582. size="3" face="Arial"> is the source of the
  583. d&amp;d-operation or not. </font></td>
  584. </tr>
  585. <tr>
  586. <td bgcolor="#FFFFEF">&nbsp;</td>
  587. </tr>
  588. <tr>
  589. <td>&nbsp;</td>
  590. <td bgcolor="#008080"><font color="#FFFFFF" size="5"
  591. face="Arial"><b>Registered</b></font><font size="5"
  592. face="Arial"><b> </b></font><font color="#FFFF80"
  593. size="3" face="Arial"><b><i>public, read-only</i></b></font></td>
  594. </tr>
  595. <tr>
  596. <td rowspan="2">&nbsp;</td>
  597. <td bgcolor="#FFFFCC"><font size="3" face="Arial">You can
  598. determine here, if the<b> </b></font><a
  599. href="#DragDropControl"><font size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  600. size="3" face="Arial"> is registered as target of
  601. drag&amp;drop operations or not.</font></td>
  602. </tr>
  603. <tr>
  604. <td bgcolor="#FFFFEF">&nbsp;</td>
  605. </tr>
  606. <tr>
  607. <td>&nbsp;</td>
  608. <td bgcolor="#008080"><a name="RenderOn"><font
  609. color="#FFFFFF" size="5" face="Arial"><b>RenderOn</b></font></a><font
  610. size="5" face="Arial"><b> </b></font><font
  611. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  612. </tr>
  613. <tr>
  614. <td rowspan="2">&nbsp;</td>
  615. <td bgcolor="#FFFFCC"><font size="3" face="Arial">You can
  616. determine here, when the dropped data should be rendered
  617. (only important for the inherited classes).</font> <p><font
  618. size="3" face="Arial">If it is set to<strong> </strong><strong><i>rdoDropSync</i></strong>,
  619. the data is rendered before calling the event-handler </font><a
  620. href="#OnDrop"><font size="3" face="Arial"><b><i>OnDrop</i></b></font></a><font
  621. size="3" face="Arial">.</font></p>
  622. <p><font size="3" face="Arial">If it is set to <b><i>rdoDropAsync</i></b>,
  623. the data is rendered before calling the event-handler </font><a
  624. href="#OnProcessDropped"><font size="3" face="Arial"><b><i>OnProcessDropped</i></b></font></a><font
  625. size="3" face="Arial">.</font></p>
  626. <p><font size="3" face="Arial">If it is set to <b><i>rdoEnter</i></b>,
  627. the data is rendered before calling the event-handler </font><a
  628. href="#OnDragEnter"><font size="3" face="Arial"><b><i>OnDragEnter</i></b></font></a><font
  629. size="3" face="Arial">.</font></p>
  630. <p><font size="3" face="Arial">If it is set to <b><i>rdoEnterAndDropSync</i></b>,
  631. the data is rendered before calling the event-handler </font><a
  632. href="#OnDragEnter"><font size="3" face="Arial"><b><i>OnDragEnter</i></b></font></a><font
  633. size="3" face="Arial"> AND before calling the
  634. event-handler </font><a href="#OnDrop"><font size="3"
  635. face="Arial"><b><i>OnDrop</i></b></font></a><font
  636. size="3" face="Arial"> (yes two times - in some cases
  637. it's necessary).</font></p>
  638. <p><font size="3" face="Arial">If it is set to <b><i>rdoEnterAndDropAsync</i></b>,
  639. the data is rendered before calling the event-handler </font><a
  640. href="#OnDragEnter"><font size="3" face="Arial"><b><i>OnDragEnter</i></b></font></a><font
  641. size="3" face="Arial"> AND before calling the
  642. event-handler </font><a href="#OnProcessDropped"><font
  643. size="3" face="Arial"><b><i>OnProcessDropped</i></b></font></a><font
  644. size="3" face="Arial"> (yes two times - in some cases
  645. it's necessary).</font></p>
  646. <p><font size="3" face="Arial">If it is set to <b><i>rdoNever</i></b>,
  647. the data is never rendered. Normally, you never need this
  648. value - it makes only sense for application-internal
  649. drag&amp;drop (the application knows the data; why should
  650. we spend our precious time on rendering the known data?)</font></p>
  651. <p><font size="3" face="Arial">Be careful, if you set
  652. this property to <b><i>rdoDropAsync</i></b>, <b><i>rdoDropEnterAndDropSync</i></b>,
  653. <b><i>rdoDropEnterAndDropAsync</i></b> or <b><i>rdoEnter</i></b>,
  654. because the OLE2 Drag&amp;Drop isn't correctly
  655. implemented in every program. On testing (high
  656. recommend!!!), you will be surprised, how many well-known
  657. programs make trouble because of wrong implemention. </font></p>
  658. </td>
  659. </tr>
  660. <tr>
  661. <td bgcolor="#FFFFEF">&nbsp;</td>
  662. </tr>
  663. <tr>
  664. <td>&nbsp;</td>
  665. <td bgcolor="#008080"><a name="ScrollDetectOptions"><font
  666. color="#FFFFFF" size="5" face="Arial"><b>ScrollDetectOptions</b></font></a><font
  667. size="3" face="Arial"><b> </b></font><font
  668. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  669. </tr>
  670. <tr>
  671. <td rowspan="2">&nbsp;</td>
  672. <td bgcolor="#FFFFCC"><font size="3" face="Arial">This
  673. property has many sub-properties:</font> <ul>
  674. <li><font size="3" face="Arial"><em><b>AreaBottom</b></em>,
  675. <em><b>AreaLeft</b></em>, <em><b>AreaRight</b></em>
  676. and <em><b>AreaTop</b></em></font></li>
  677. <li><font size="3" face="Arial"><em><b>HorzScrolling</b></em>
  678. and <em><b>VertScrolling</b></em></font></li>
  679. <li><font size="3" face="Arial"><em><b>HorzPageScroll</b></em>
  680. and <em><b>VertPageScroll</b></em></font></li>
  681. <li><font size="3" face="Arial"><em><b>ScrollDelay</b></em><b>
  682. </b>and<b> </b><em><b>StartDelay</b></em></font></li>
  683. </ul>
  684. <p><font size="3" face="Arial"><em><b>AreaBottom</b></em>,
  685. <em><b>AreaLeft</b></em>, <em><b>AreaRight</b></em>, <em><b>AreaTop</b></em>
  686. have the sub-properties <em><b>Margin</b></em>, <em><b>Range</b></em>.
  687. You can determine with <em><b>Margin</b></em> where the
  688. scroll-detect-area begins, measured from the </font><font
  689. color="#FF0000" size="3" face="Arial"><strong>client</strong></font><font
  690. size="3" face="Arial">area-border. You can determine with
  691. <em><b>Range</b></em> the width resp. height of the
  692. scroll-detect-area. The properties <b><i>AreaBottom</i></b>
  693. and <b><i>AreaTop</i></b> are used for the vertical
  694. scroll detection, <b><i>AreaLeft</i></b> and <b><i>AreaRight</i></b>
  695. for the horizontal detection.</font></p>
  696. <p><font size="3" face="Arial"><em><b>HorzScrolling</b></em>
  697. and <em><b>VertScrolling</b></em> are further
  698. sub-properties under <b><i>ScrollDetectOptions</i></b>.
  699. You can enable/disable the scroll detection with these
  700. properties.</font></p>
  701. <p><font size="3" face="Arial"><em><b>HorzPageScroll</b></em>
  702. and <em><b>VertPageScroll</b></em> are even further
  703. sub-properties under <b><i>ScrollDetectOptions</i></b>.
  704. You can switch here between line or page scrolling.</font></p>
  705. <p><font size="3" face="Arial"><em><b>ScrollDelay</b></em>
  706. is even a sub-property under <b><i>ScrollDetectOptions</i></b>.
  707. You can determine with property the delay time to the
  708. next scroll event in the <b><i>DragDropControl</i></b>.</font></p>
  709. <p><font size="3" face="Arial"><em><b>StartDelay</b></em>
  710. is even a further sub-property under <b><i>ScrollDetectOptions</i></b>.
  711. You can determine with property the delay time till the
  712. first scroll event is sent to the <b><i>DragDropControl</i></b>.</font></p>
  713. <p><font size="3" face="Arial">The scroll-detection does
  714. only work, if at least one </font><a
  715. href="#TargetEffects"><font size="3" face="Arial">TargetEffect</font></a><font
  716. size="3" face="Arial"> is set.</font></p>
  717. </td>
  718. </tr>
  719. <tr>
  720. <td bgcolor="#FFFFEF">&nbsp;</td>
  721. </tr>
  722. <tr>
  723. <td>&nbsp;</td>
  724. <td bgcolor="#008080"><a name="SourceCompatibility"><font
  725. color="#FFFFFF" size="5" face="Arial"><b>SourceCompatibility</b></font></a><font
  726. size="5" face="Arial"><b> </b></font><font
  727. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  728. </tr>
  729. <tr>
  730. <td rowspan="2">&nbsp;</td>
  731. <td bgcolor="#FFFFCC"><font size="3" face="Arial">This
  732. property was added due to incompatible implemention of
  733. drag&amp;drop in other applications. They set some value
  734. incorrectly in the <em><strong>FormatEtc</strong></em>
  735. record, because these values aren't used for the dragged
  736. format. With this property you can determine, if you
  737. don't to check these values for a successful
  738. drag&amp;drop. If you disable a check, you take risk to
  739. drop data in a invalid format. Normally, you need not to
  740. switch this property.</font></td>
  741. </tr>
  742. <tr>
  743. <td bgcolor="#FFFFEF">&nbsp;</td>
  744. </tr>
  745. <tr>
  746. <td>&nbsp;</td>
  747. <td bgcolor="#008080"><a name="SourceEffects"><font
  748. color="#FFFFFF" size="5" face="Arial"><b>SourceEffects</b></font></a><font
  749. size="5" face="Arial"><b> </b></font><font
  750. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  751. </tr>
  752. <tr>
  753. <td rowspan="2">&nbsp;</td>
  754. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Choose
  755. the effects that the<b> </b></font><a
  756. href="#DragDropControl"><font size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  757. size="3" face="Arial"> should support. If you don't want
  758. that the </font><a href="#DragDropControl"><font size="3"
  759. face="Arial"><b><i>DragDropControl</i></b></font></a><font
  760. size="3" face="Arial"> serve as drag&amp;drop source all
  761. items must be false.</font> <p><font color="#FF0000"
  762. size="3" face="Arial"><strong>IMPORTANT:</strong></font><font
  763. size="3" face="Arial"> If you use the drag-detection,
  764. it's high recommended to check the section &quot;</font><a
  765. href="#DragDetectionProblem"><font size="3" face="Arial">Problems
  766. With The Drag-Detection</font></a><font size="3"
  767. face="Arial">&quot;.</font></p>
  768. </td>
  769. </tr>
  770. <tr>
  771. <td bgcolor="#FFFFEF">&nbsp;</td>
  772. </tr>
  773. <tr>
  774. <td>&nbsp;</td>
  775. <td bgcolor="#008080"><a name="TargetEffects"><font
  776. color="#FFFFFF" size="5" face="Arial"><b>TargetEffects</b></font></a><font
  777. size="5" face="Arial"><b> </b></font><font
  778. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  779. </tr>
  780. <tr>
  781. <td rowspan="2">&nbsp;</td>
  782. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Choose
  783. the effects that the<b> </b></font><a
  784. href="#DragDropControl"><font size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  785. size="3" face="Arial"> should support. If you don't want
  786. that the </font><a href="#DragDropControl"><font size="3"
  787. face="Arial"><b><i>DragDropControl</i></b></font></a><font
  788. size="3" face="Arial"> serve as drag&amp;drop target, all
  789. items must be false. </font></td>
  790. </tr>
  791. <tr>
  792. <td bgcolor="#FFFFEF">&nbsp;</td>
  793. </tr>
  794. <tr>
  795. <td>&nbsp;</td>
  796. <td bgcolor="#008080"><a name="TargetPopUpMenu"><font
  797. color="#FFFFFF" size="5" face="Arial"><b>TargetPopUpMenu</b></font></a><font
  798. size="5" face="Arial"><b> </b></font><font
  799. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  800. </tr>
  801. <tr>
  802. <td rowspan="2">&nbsp;</td>
  803. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Here
  804. you determine, if should the popup-menu get visible when
  805. a drag&amp;drop operations occurs with pressing the right
  806. mouse button or not. (Important, if the <em><strong>DragDropControl</strong></em>
  807. is configured as drag&amp;drop target!!!) </font></td>
  808. </tr>
  809. <tr>
  810. <td bgcolor="#FFFFEF" height="50">&nbsp;</td>
  811. </tr>
  812. </table>
  813. <table border="0" width="600">
  814. <tr>
  815. <td width="10" bgcolor="#008080" height="10">&nbsp; </td>
  816. <td rowspan="2" width="590"><font size="5" face="Arial">Events</font></td>
  817. </tr>
  818. <tr>
  819. <td>&nbsp;</td>
  820. </tr>
  821. </table>
  822. <table border="0" cellpadding="3" cellspacing="0" width="600">
  823. <tr>
  824. <td width="10">&nbsp;</td>
  825. <td bgcolor="#008080"><a name="OnBeforeScrolling"><font
  826. color="#FFFFFF" size="5" face="Arial"><b>OnBeforeScrolling</b></font></a><font
  827. size="5" face="Arial"><b> </b></font><font
  828. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  829. </tr>
  830. <tr>
  831. <td rowspan="2">&nbsp;</td>
  832. <td bgcolor="#FFFFCC"><font size="3" face="Arial">This
  833. event is called before a scroll-event is sent to the<b> </b><b><i>DragDropControl</i></b>.
  834. The scroll-detection must be enabled for this event. </font></td>
  835. </tr>
  836. <tr>
  837. <td bgcolor="#FFFFEF">&nbsp;</td>
  838. </tr>
  839. <tr>
  840. <td>&nbsp;</td>
  841. <td bgcolor="#008080"><a name="OnAfterScrolling"><font
  842. color="#FFFFFF" size="5" face="Arial"><b>OnAfterScrolling</b></font></a><font
  843. color="#FFFFFF" size="5" face="Arial"><strong> </strong></font><font
  844. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  845. </tr>
  846. <tr>
  847. <td rowspan="2">&nbsp;</td>
  848. <td bgcolor="#FFFFCC"><font size="3" face="Arial">This
  849. event is called after a scroll-event is sent to the<b> </b><b><i>DragDropControl</i></b>.
  850. The scroll-detection must be enabled for this event. </font></td>
  851. </tr>
  852. <tr>
  853. <td bgcolor="#FFFFEF">&nbsp;</td>
  854. </tr>
  855. <tr>
  856. <td>&nbsp;</td>
  857. <td bgcolor="#008080"><a name="OnDragDetect"><font
  858. color="#FFFFFF" size="5" face="Arial"><b>OnDragDetect</b></font></a><font
  859. color="#FFFFFF" size="5" face="Arial"><strong> </strong></font><font
  860. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  861. </tr>
  862. <tr>
  863. <td rowspan="2">&nbsp;</td>
  864. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Is
  865. called on starting (parameter <b><i>DragStatus</i></b>=<b><i>ddsLeft</i></b>
  866. or <b><i>ddsRight</i></b>, depends which mousebutton is
  867. pressed), on starting the drag (<b><i>DragStatus</i></b>=<b><i>ddsDrag</i></b>),
  868. on finishing the detection (<b><i>DragStatus</i></b>=<b><i>ddsNone</i></b>)
  869. and cancelling the detection (<b><i>DragStatus</i></b>=<b><i>ddsCancelled</i></b>).
  870. If <b><i>DragStatus</i></b>=<b><i>ddsDrag</i></b>, the
  871. drag&amp;drop operation won't be started automatically.
  872. If you want to start drag&amp;drop, you must call </font><a
  873. href="#Execute"><font size="3" face="Arial"><b><i>Execute</i></b></font></a><font
  874. size="3" face="Arial"> on yourself. The parameters <b><i>DetectStartX</i></b>
  875. and <b><i>DetectStartY</i></b> specify the cursor
  876. position, where the detection has started. The parameters
  877. <b><i>x</i></b> and <b><i>y</i></b> specify the current
  878. position of the cursor.</font><p><font color="#FF0000"
  879. size="3" face="Arial"><strong>IMPORTANT:</strong></font><font
  880. size="3" face="Arial"> If you use the drag-detection,
  881. it's high recommended to check the section &quot;</font><a
  882. href="#DragDetectionProblem"><font size="3" face="Arial">Problems
  883. With The Drag-Detection</font></a><font size="3"
  884. face="Arial">&quot;.</font></p>
  885. </td>
  886. </tr>
  887. <tr>
  888. <td bgcolor="#FFFFEF">&nbsp;</td>
  889. </tr>
  890. <tr>
  891. <td>&nbsp;</td>
  892. <td bgcolor="#008080"><a name="OnDragEnter"><font
  893. color="#FFFFFF" size="5" face="Arial"><b>OnDragEnter</b></font></a><font
  894. color="#FFFFFF" size="5" face="Arial"><strong> </strong></font><font
  895. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  896. </tr>
  897. <tr>
  898. <td rowspan="2">&nbsp;</td>
  899. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Is
  900. called, when the<b> </b></font><a href="#DragDropControl"><font
  901. size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  902. size="3" face="Arial"> is a target of drag&amp;drop
  903. operations. The mouse cursor moves ON (one call only) the
  904. </font><a href="#DragDropControl"><font size="3"
  905. face="Arial"><b><i>DragDropControl</i></b></font></a><font
  906. size="3" face="Arial">. Here, you influence if a drop can
  907. be accepted and the drop's effect if accepted. </font></td>
  908. </tr>
  909. <tr>
  910. <td bgcolor="#FFFFEF">&nbsp;</td>
  911. </tr>
  912. <tr>
  913. <td>&nbsp;</td>
  914. <td bgcolor="#008080"><a name="OnDragLeave"><font
  915. color="#FFFFFF" size="5" face="Arial"><b>OnDragLeave</b></font></a><font
  916. color="#FFFFFF" size="5" face="Arial"><strong> </strong></font><font
  917. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  918. </tr>
  919. <tr>
  920. <td rowspan="2">&nbsp;</td>
  921. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Is
  922. called, when the<b> </b></font><a href="#DragDropControl"><font
  923. size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  924. size="3" face="Arial"> is a target of drag&amp;drop
  925. operations. The mouse cursor leaves the </font><a
  926. href="#DragDropControl"><font size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  927. size="3" face="Arial"> (one call only) or the
  928. drag&amp;drop operation is cancelled. </font></td>
  929. </tr>
  930. <tr>
  931. <td bgcolor="#FFFFEF">&nbsp;</td>
  932. </tr>
  933. <tr>
  934. <td>&nbsp;</td>
  935. <td bgcolor="#008080"><a name="OnDragOver"><font
  936. color="#FFFFFF" size="5" face="Arial"><b>OnDragOver</b></font></a><font
  937. color="#FFFFFF" size="5" face="Arial"><strong> </strong></font><font
  938. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  939. </tr>
  940. <tr>
  941. <td rowspan="2">&nbsp;</td>
  942. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Is
  943. called, when the<b> </b></font><a href="#DragDropControl"><font
  944. size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  945. size="3" face="Arial"> is a target of drag&amp;drop
  946. operations. The mouse cursor moves OVER (called on every
  947. mouse move) the </font><a href="#DragDropControl"><font
  948. size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  949. size="3" face="Arial">. Even here, you can influence if a
  950. drop can be accepted and the drop's effect if accepted.
  951. Because this function is very often called, YOUR method
  952. should be programmed very efficient. </font></td>
  953. </tr>
  954. <tr>
  955. <td bgcolor="#FFFFEF">&nbsp;</td>
  956. </tr>
  957. <tr>
  958. <td>&nbsp;</td>
  959. <td bgcolor="#008080"><a name="OnDrop"><font
  960. color="#FFFFFF" size="5" face="Arial"><b>OnDrop</b></font></a><font
  961. color="#FFFFFF" size="5" face="Arial"><strong> </strong></font><font
  962. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  963. </tr>
  964. <tr>
  965. <td rowspan="2">&nbsp;</td>
  966. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Is </font><font
  967. face="Arial">triggered</font><font size="3" face="Arial">,
  968. when the<b> </b></font><a href="#DragDropControl"><font
  969. size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  970. size="3" face="Arial"> is the target of drag&amp;drop
  971. operations. It instructs the </font><a
  972. href="#DragDropControl"><font size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  973. size="3" face="Arial"> to handle the data which are
  974. dropped on it. Save here only the dropped data (, if this
  975. isn't done by the child-class), because the source of the
  976. drag&amp;drop operation isn't accessable any longer as
  977. soon as this event-method was left. For processing the
  978. data in a child-class, it's high recommend to use </font><a
  979. href="#OnProcessDropped"><font size="3" face="Arial"><b><i>OnProcessDropped</i></b></font></a><font
  980. size="3" face="Arial">.</font></td>
  981. </tr>
  982. <tr>
  983. <td bgcolor="#FFFFEF">&nbsp;</td>
  984. </tr>
  985. <tr>
  986. <td>&nbsp;</td>
  987. <td bgcolor="#008080"><a name="OnDropHandlerSucceeded"><font
  988. color="#FFFFFF" size="5" face="Arial"><b>OnDropHandlerSucceeded</b></font></a><font
  989. size="5" face="Arial"><b> </b></font><font
  990. color="#FFFF80" size="3" face="Arial"><b><i>protected</i></b></font></td>
  991. </tr>
  992. <tr>
  993. <td>&nbsp;</td>
  994. <td bgcolor="#FFFFCC"><font face="Arial">Is triggered, if
  995. the </font><a href="#DropHandler"><font face="Arial"><em><strong>DropHandler</strong></em></font></a><font
  996. face="Arial"> was successfully called and executed.</font><p><font
  997. face="Arial">Also check the section: </font><font
  998. size="3" face="Arial">&quot;</font><a
  999. href="#Details about the DropHandler"><font size="3"
  1000. face="Arial">Details about the DropHandler</font></a><font
  1001. size="3" face="Arial">&quot;.</font></p>
  1002. </td>
  1003. </tr>
  1004. <tr>
  1005. <td>&nbsp;</td>
  1006. <td>&nbsp;</td>
  1007. </tr>
  1008. <tr>
  1009. <td>&nbsp;</td>
  1010. <td bgcolor="#008080"><a name="OnGiveFeedback"><font
  1011. color="#FFFFFF" size="5" face="Arial"><b>OnGiveFeedback</b></font></a><font
  1012. color="#FFFFFF" size="5" face="Arial"><strong> </strong></font><font
  1013. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  1014. </tr>
  1015. <tr>
  1016. <td rowspan="2">&nbsp;</td>
  1017. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Is
  1018. called, when the<b> </b></font><a href="#DragDropControl"><font
  1019. size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  1020. size="3" face="Arial"> is the source of drag&amp;drop
  1021. operations. It enables the source application to give
  1022. visual feedback to its end user during a drag&amp;drop
  1023. operation by providing the OLE <b><i>DoDragDrop</i></b>
  1024. function with an enumeration value specifying the visual
  1025. effect. Mostly you don't need this event. </font></td>
  1026. </tr>
  1027. <tr>
  1028. <td bgcolor="#FFFFEF">&nbsp;</td>
  1029. </tr>
  1030. <tr>
  1031. <td>&nbsp;</td>
  1032. <td bgcolor="#008080"><a name="OnMenuDestroy"><font
  1033. color="#FFFFFF" size="5" face="Arial"><b>OnMenuDestroy</b></font></a><font
  1034. size="5" face="Arial"><b> </b></font><font
  1035. color="#FFFF80" size="3" face="Arial"><b><i>protected</i></b></font></td>
  1036. </tr>
  1037. <tr>
  1038. <td>&nbsp;</td>
  1039. <td bgcolor="#FFFFCC"><font face="Arial">Is triggered,
  1040. when the context-menu and its items are going to be
  1041. destroyed. This event important for you, if you have add
  1042. custom items to the menu.</font><p><font face="Arial">Also
  1043. check the section: </font><font size="3" face="Arial">&quot;</font><a
  1044. href="#Details about the context-menu"><font size="3"
  1045. face="Arial">Details about the context-menu</font></a><font
  1046. size="3" face="Arial">&quot;.</font></p>
  1047. </td>
  1048. </tr>
  1049. <tr>
  1050. <td>&nbsp;</td>
  1051. <td>&nbsp;</td>
  1052. </tr>
  1053. <tr>
  1054. <td>&nbsp;</td>
  1055. <td bgcolor="#008080"><a name="OnMenuExecCmd"><font
  1056. color="#FFFFFF" size="5" face="Arial"><b>OnMenuExecCmd</b></font></a><font
  1057. size="5" face="Arial"><b> </b></font><font
  1058. color="#FFFF80" size="3" face="Arial"><b><i>protected</i></b></font></td>
  1059. </tr>
  1060. <tr>
  1061. <td>&nbsp;</td>
  1062. <td bgcolor="#FFFFCC"><font face="Arial">Is triggered,
  1063. when a custom item was selected in the context-menu by
  1064. the user. Now, you should execute the routines etc, which
  1065. are linked with the selected menuitem.</font><p><font
  1066. face="Arial">Also check the section: </font><font
  1067. size="3" face="Arial">&quot;</font><a
  1068. href="#Details about the context-menu"><font size="3"
  1069. face="Arial">Details about the context-menu</font></a><font
  1070. size="3" face="Arial">&quot;.</font></p>
  1071. </td>
  1072. </tr>
  1073. <tr>
  1074. <td>&nbsp;</td>
  1075. <td>&nbsp;</td>
  1076. </tr>
  1077. <tr>
  1078. <td>&nbsp;</td>
  1079. <td bgcolor="#008080"><a name="OnMenuPopup"><font
  1080. color="#FFFFFF" size="5" face="Arial"><b>OnMenuPopup</b></font></a><font
  1081. size="5" face="Arial"><b> </b></font><font
  1082. color="#FFFF80" size="3" face="Arial"><b><i>protected</i></b></font></td>
  1083. </tr>
  1084. <tr>
  1085. <td>&nbsp;</td>
  1086. <td bgcolor="#FFFFCC"><font face="Arial">Is triggered,
  1087. when the context-menu is going to popup.</font><p><font
  1088. face="Arial">Also check the section: </font><font
  1089. size="3" face="Arial">&quot;</font><a
  1090. href="#Details about the context-menu"><font size="3"
  1091. face="Arial">Details about the context-menu</font></a><font
  1092. size="3" face="Arial">&quot;.</font></p>
  1093. </td>
  1094. </tr>
  1095. <tr>
  1096. <td>&nbsp;</td>
  1097. <td>&nbsp;</td>
  1098. </tr>
  1099. <tr>
  1100. <td>&nbsp;</td>
  1101. <td bgcolor="#008080"><a name="OnMenuSucceeded"><font
  1102. color="#FFFFFF" size="5" face="Arial"><b>OnMenuSucceeded</b></font></a><font
  1103. size="5" face="Arial"><b> </b></font><font
  1104. color="#FFFF80" size="3" face="Arial"><b><i>protected</i></b></font></td>
  1105. </tr>
  1106. <tr>
  1107. <td>&nbsp;</td>
  1108. <td bgcolor="#FFFFCC"><font face="Arial">Is triggered,
  1109. when the routines etc, which are linked with the selected
  1110. menuitem, were successfully executed.</font><p><font
  1111. face="Arial">Also check the section: </font><font
  1112. size="3" face="Arial">&quot;</font><a
  1113. href="#Details about the context-menu"><font size="3"
  1114. face="Arial">Details about the context-menu</font></a><font
  1115. size="3" face="Arial">&quot;.</font></p>
  1116. </td>
  1117. </tr>
  1118. <tr>
  1119. <td>&nbsp;</td>
  1120. <td>&nbsp;</td>
  1121. </tr>
  1122. <tr>
  1123. <td>&nbsp;</td>
  1124. <td bgcolor="#008080"><a name="OnProcessDropped"><font
  1125. color="#FFFFFF" size="5" face="Arial"><b>OnProcessDropped</b></font></a><font
  1126. color="#FFFFFF" size="5" face="Arial"><strong> </strong></font><font
  1127. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  1128. </tr>
  1129. <tr>
  1130. <td rowspan="2">&nbsp;</td>
  1131. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Is
  1132. called after<b> </b></font><a href="#OnDrop"><font
  1133. size="3" face="Arial"><b><i>OnDrop</i></b></font></a><font
  1134. size="3" face="Arial"> by a self sended message with
  1135. &quot;PostMessage&quot;. This has the effect, that the
  1136. user can access to the source of the drag&amp;drop
  1137. operation during you process the dropped data. Of course,
  1138. you must save the dropped data in </font><a
  1139. href="#OnDrop"><font size="3" face="Arial"><b><i>OnDrop</i></b></font></a><font
  1140. size="3" face="Arial">. In my child-classes you haven't
  1141. care about this. </font></td>
  1142. </tr>
  1143. <tr>
  1144. <td bgcolor="#FFFFEF">&nbsp;</td>
  1145. </tr>
  1146. <tr>
  1147. <td>&nbsp;</td>
  1148. <td bgcolor="#008080"><a name="OnQueryContinueDrag"><font
  1149. color="#FFFFFF" size="5" face="Arial"><b>OnQueryContinueDrag</b></font></a><font
  1150. color="#FFFFFF" size="5" face="Arial"><strong> </strong></font><font
  1151. color="#FFFF80" size="3" face="Arial"><b><i>published</i></b></font></td>
  1152. </tr>
  1153. <tr>
  1154. <td rowspan="2">&nbsp;</td>
  1155. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Is
  1156. called, when the<b> </b></font><a href="#DragDropControl"><font
  1157. size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  1158. size="3" face="Arial"> is a source of drag&amp;drop
  1159. operations. You can determine whether the drag&amp;drop
  1160. operation should be continued, cancelled, or completed.
  1161. You do not call this method directly. The OLE <b><i>DoDragDrop</i></b>
  1162. function calls this method during a drag-and-drop
  1163. operation. Mostly, you don't need this event. </font></td>
  1164. </tr>
  1165. <tr>
  1166. <td bgcolor="#FFFFEF" height="50">&nbsp;</td>
  1167. </tr>
  1168. </table>
  1169. <table border="0" width="600">
  1170. <tr>
  1171. <td width="10" bgcolor="#008080" height="10">&nbsp;</td>
  1172. <td rowspan="2" width="590"><font size="5" face="Arial">Methods</font></td>
  1173. </tr>
  1174. <tr>
  1175. <td>&nbsp;</td>
  1176. </tr>
  1177. </table>
  1178. <table border="0" cellpadding="3" cellspacing="0" width="600">
  1179. <tr>
  1180. <td width="10">&nbsp;</td>
  1181. <td bgcolor="#008080"><a name="CopyToClipboard"><font
  1182. color="#FFFFFF" size="5" face="Arial"><b>CopyToClipboard</b></font></a><font
  1183. color="#FFFFFF" size="5" face="Arial"><strong> </strong></font><font
  1184. color="#FFFF80" size="2" face="Arial"><b><i>public</i></b></font></td>
  1185. </tr>
  1186. <tr>
  1187. <td rowspan="2">&nbsp;</td>
  1188. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Call
  1189. this method, if you want to copy your data to the
  1190. clipboard.</font></td>
  1191. </tr>
  1192. <tr>
  1193. <td bgcolor="#FFFFEF">&nbsp;</td>
  1194. </tr>
  1195. <tr>
  1196. <td>&nbsp;</td>
  1197. <td bgcolor="#008080"><a name="DoMenuDestroy"><font
  1198. color="#FFFFFF" size="5" face="Arial"><b>DoMenuDestroy</b></font></a><font
  1199. size="3" face="Arial"><b> </b></font><font
  1200. color="#FFFF80" size="3" face="Arial"><b><i>protected</i></b></font></td>
  1201. </tr>
  1202. <tr>
  1203. <td>&nbsp;</td>
  1204. <td bgcolor="#FFFFCC"><font face="Arial">Never call the
  1205. method directly - it is called by this component itself.
  1206. This method has the same purpose as the event </font><a
  1207. href="#OnMenuDestroy"><font face="Arial"><em><strong>OnMenuDestroy</strong></em></font></a><font
  1208. face="Arial">. You can use this method for inherited
  1209. classes.</font><p><font face="Arial">Also check the
  1210. section: </font><font size="3" face="Arial">&quot;</font><a
  1211. href="#Details about the context-menu"><font size="3"
  1212. face="Arial">Details about the context-menu</font></a><font
  1213. size="3" face="Arial">&quot;.</font></p>
  1214. </td>
  1215. </tr>
  1216. <tr>
  1217. <td>&nbsp;</td>
  1218. <td>&nbsp;</td>
  1219. </tr>
  1220. <tr>
  1221. <td>&nbsp;</td>
  1222. <td bgcolor="#008080"><a name="DoMenuExecCmd"><font
  1223. color="#FFFFFF" size="5" face="Arial"><b>DoMenuExecCmd</b></font></a><font
  1224. size="3" face="Arial"><b> </b></font><font
  1225. color="#FFFF80" size="3" face="Arial"><b><i>protected</i></b></font></td>
  1226. </tr>
  1227. <tr>
  1228. <td>&nbsp;</td>
  1229. <td bgcolor="#FFFFCC"><font face="Arial">Never call the
  1230. method directly - it is called by this component itself.
  1231. This method has the same purpose as the event </font><a
  1232. href="#OnMenuExecCmd"><font face="Arial"><em><strong>OnMenuExecCmd</strong></em></font></a><font
  1233. face="Arial">. You can use this method for inherited
  1234. classes.</font><p><font face="Arial">Also check the
  1235. section: </font><font size="3" face="Arial">&quot;</font><a
  1236. href="#Details about the context-menu"><font size="3"
  1237. face="Arial">Details about the context-menu</font></a><font
  1238. size="3" face="Arial">&quot;.</font></p>
  1239. </td>
  1240. </tr>
  1241. <tr>
  1242. <td>&nbsp;</td>
  1243. <td>&nbsp;</td>
  1244. </tr>
  1245. <tr>
  1246. <td>&nbsp;</td>
  1247. <td bgcolor="#008080"><a name="DoMenuPopup"><font
  1248. color="#FFFFFF" size="5" face="Arial"><b>DoMenuPopup</b></font></a><font
  1249. size="3" face="Arial"><b> </b></font><font
  1250. color="#FFFF80" size="3" face="Arial"><b><i>protected</i></b></font></td>
  1251. </tr>
  1252. <tr>
  1253. <td>&nbsp;</td>
  1254. <td bgcolor="#FFFFCC"><font face="Arial">Never call the
  1255. method directly - it is called by this component itself.
  1256. This method has the same purpose as the event </font><a
  1257. href="#OnMenuPopup"><font face="Arial"><em><strong>OnMenuPopup</strong></em></font></a><font
  1258. face="Arial">. You can use this method for inherited
  1259. classes.</font><p><font face="Arial">Also check the
  1260. section: </font><font size="3" face="Arial">&quot;</font><a
  1261. href="#Details about the context-menu"><font size="3"
  1262. face="Arial">Details about the context-menu</font></a><font
  1263. size="3" face="Arial">&quot;.</font></p>
  1264. </td>
  1265. </tr>
  1266. <tr>
  1267. <td>&nbsp;</td>
  1268. <td>&nbsp;</td>
  1269. </tr>
  1270. <tr>
  1271. <td>&nbsp;</td>
  1272. <td bgcolor="#008080"><a name="DropHandler"><font
  1273. color="#FFFFFF" size="5" face="Arial"><b>DropHandler</b></font></a><font
  1274. size="3" face="Arial"><b> </b></font><font
  1275. color="#FFFF80" size="3" face="Arial"><b><i>protected </i></b></font></td>
  1276. </tr>
  1277. <tr>
  1278. <td>&nbsp;</td>
  1279. <td bgcolor="#FFFFCC"><font face="Arial">Never call the
  1280. method directly - it is called by this component itself.
  1281. Inherit this method for implementing custom
  1282. drop-handlers.</font><p><font face="Arial">Also check the
  1283. section: </font><font size="3" face="Arial">&quot;</font><a
  1284. href="#Details about the DropHandler"><font size="3"
  1285. face="Arial">Details about the DropHandler</font></a><font
  1286. size="3" face="Arial">&quot;.</font></p>
  1287. </td>
  1288. </tr>
  1289. <tr>
  1290. <td>&nbsp;</td>
  1291. <td>&nbsp;</td>
  1292. </tr>
  1293. <tr>
  1294. <td>&nbsp;</td>
  1295. <td bgcolor="#008080"><a name="Execute"><font
  1296. color="#FFFFFF" size="5" face="Arial"><b>Execute</b></font></a><font
  1297. color="#FFFFFF" size="5" face="Arial"><b> </b></font><font
  1298. color="#FFFF80" size="2" face="Arial"><b><i>public</i></b></font></td>
  1299. </tr>
  1300. <tr>
  1301. <td rowspan="2">&nbsp;</td>
  1302. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Call
  1303. this method, if you detect that the user wants to start a
  1304. drag&amp;drop operation (e.g. MouseDown). Before calling,
  1305. you have to create a valid IDataObject (for more
  1306. informations, look over the source of the components
  1307. &quot;TDragDropFiles&quot; or
  1308. &quot;TDragDropFiles&quot;).</font> <p><font
  1309. color="#FF0000" size="3" face="Arial"><strong>IMPORTANT:</strong></font><font
  1310. size="3" face="Arial"> If you use the drag-detection,
  1311. it's high recommended to check the section &quot;</font><a
  1312. href="#DragDetectionProblem"><font size="3" face="Arial">Problems
  1313. With The Drag-Detection</font></a><font size="3"
  1314. face="Arial">&quot;.</font></p>
  1315. </td>
  1316. </tr>
  1317. <tr>
  1318. <td bgcolor="#FFFFEF">&nbsp;</td>
  1319. </tr>
  1320. <tr>
  1321. <td>&nbsp;</td>
  1322. <td bgcolor="#008080"><a name="ExecuteOperation"><font
  1323. color="#FFFFFF" size="5" face="Arial"><b>ExecuteOperation</b></font></a><font
  1324. color="#FFFFFF" size="5" face="Arial"><b> </b></font><font
  1325. color="#FFFF80" size="2" face="Arial"><b><i>public</i></b></font></td>
  1326. </tr>
  1327. <tr>
  1328. <td rowspan="2">&nbsp;</td>
  1329. <td bgcolor="#FFFFCC"><font size="3" face="Arial">This
  1330. method is called by<b> </b><b><i>Execute</i></b>.
  1331. Normally, you don't call this method directly.</font></td>
  1332. </tr>
  1333. <tr>
  1334. <td bgcolor="#FFFFEF">&nbsp;</td>
  1335. </tr>
  1336. <tr>
  1337. <td>&nbsp;</td>
  1338. <td bgcolor="#008080"><a name="ExecuteOperation"><font
  1339. color="#FFFFFF" size="5" face="Arial"><b>GetFromClipboard</b></font></a><font
  1340. color="#FFFFFF" size="5" face="Arial"><b> </b></font><font
  1341. color="#FFFF80" size="2" face="Arial"><b><i>public</i></b></font></td>
  1342. </tr>
  1343. <tr>
  1344. <td rowspan="2">&nbsp;</td>
  1345. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Call
  1346. this method, if you want to get data from the clipboard.
  1347. This will only succeed, if the data formats are
  1348. supported.</font></td>
  1349. </tr>
  1350. <tr>
  1351. <td bgcolor="#FFFFEF">&nbsp;</td>
  1352. </tr>
  1353. <tr>
  1354. <td>&nbsp;</td>
  1355. <td bgcolor="#008080"><a name="StartDnDDetection"><font
  1356. color="#FFFFFF" size="5" face="Arial"><b>StartDnDDetection</b></font></a><font
  1357. color="#FFFFFF" size="5" face="Arial"><b> </b></font><font
  1358. color="#FFFF80" size="2" face="Arial"><b><i>public</i></b></font></td>
  1359. </tr>
  1360. <tr>
  1361. <td rowspan="2">&nbsp;</td>
  1362. <td bgcolor="#FFFFCC"><font size="3" face="Arial">Call
  1363. this method, if you want to start the drag detection
  1364. manually. Normally, you call this method in the
  1365. OnMouseDown event.</font></td>
  1366. </tr>
  1367. <tr>
  1368. <td bgcolor="#FFFFEF" height="50">&nbsp;</td>
  1369. </tr>
  1370. </table>
  1371. <table border="0" width="600">
  1372. <tr>
  1373. <td width="10" bgcolor="#008080" height="10">&nbsp;</td>
  1374. <td rowspan="2" width="590"><font size="5" face="Arial">Constants</font></td>
  1375. </tr>
  1376. <tr>
  1377. <td>&nbsp;</td>
  1378. </tr>
  1379. </table>
  1380. <table border="0" cellpadding="3" cellspacing="0" width="600">
  1381. <tr>
  1382. <td width="14">&nbsp;</td>
  1383. <td bgcolor="#008080"><font color="#FFFFFF" size="5"
  1384. face="Arial"><b>DROPEFFECT_NONE, DROPEFFECT_COPY,
  1385. DROPEFFECT_MOVE, DROPEFFECT_LINK, DROPEFFECT_SCROLL</b></font></td>
  1386. </tr>
  1387. <tr>
  1388. <td rowspan="2">&nbsp;</td>
  1389. <td bgcolor="#FFFFCC"><font size="3" face="Arial">These
  1390. constants describe the kind of drop effect the user want
  1391. to have. These values are used by the parameter<b> </b><b><i>dwEffect</i></b>
  1392. of methods. <b><i>DROPEFFECT_SCROLL</i></b> indicates a
  1393. scrolling context of the drop target. </font></td>
  1394. </tr>
  1395. <tr>
  1396. <td bgcolor="#FFFFEF" height="50">&nbsp;</td>
  1397. </tr>
  1398. </table>
  1399. <table border="0" width="600">
  1400. <tr>
  1401. <td width="10" bgcolor="#008080" height="10">&nbsp;</td>
  1402. <td rowspan="2" colspan="2" width="590"><font size="5"
  1403. face="Arial">How Do I Use It As Drag&amp;Drop Source</font></td>
  1404. </tr>
  1405. <tr>
  1406. <td>&nbsp;</td>
  1407. </tr>
  1408. <tr>
  1409. <td>&nbsp;</td>
  1410. <td valign="top"><font face="Arial">1.</font></td>
  1411. <td><font face="Arial">Drop a TWinControl on the form
  1412. (e.g. a listbox). </font></td>
  1413. </tr>
  1414. <tr>
  1415. <td>&nbsp;</td>
  1416. <td valign="top"><font face="Arial">2.</font></td>
  1417. <td><font face="Arial">Choose the TWinControl (listbox)
  1418. in </font><a href="#DragDropControl"><font face="Arial"><em><strong>DragDropControl</strong></em></font></a><font
  1419. face="Arial">.</font></td>
  1420. </tr>
  1421. <tr>
  1422. <td>&nbsp;</td>
  1423. <td valign="top"><font face="Arial">3. </font></td>
  1424. <td><font face="Arial">Choose the drag&amp;drop effects
  1425. under </font><a href="#SourceEffects"><font face="Arial"><em><strong>SourceEffects</strong></em></font></a><font
  1426. face="Arial"> that the <em><strong>DragDropControl </strong></em>(listbox)
  1427. should support. If you don't want any longer that the <em><strong>DragDropControl</strong></em>
  1428. serve as drag&amp;drop source all items must be set to
  1429. false.</font></td>
  1430. </tr>
  1431. <tr>
  1432. <td>&nbsp;</td>
  1433. <td valign="top"><font face="Arial">4.</font></td>
  1434. <td><font face="Arial">Now, your <em><strong>DragDropControl</strong></em>
  1435. (listbox) must detect, if the user wants to start a
  1436. drag&amp;drop operation. You can use the event
  1437. &quot;OnMouseDown&quot; of your <em><strong>DragDropControl</strong></em>
  1438. (listbox). </font><font size="3" face="Arial">You must
  1439. create a DataObject. If you have no idea, how to do that,
  1440. look over the source of the component <em><strong>TDragDropFiles</strong></em>
  1441. or <em><strong>TDragDropText</strong></em>.</font></td>
  1442. </tr>
  1443. <tr>
  1444. <td>&nbsp;</td>
  1445. <td valign="top"><font face="Arial">5.</font></td>
  1446. <td valign="top"><font face="Arial">Tell Windows that
  1447. there is a drag&amp;drop operation to handle: J</font><font
  1448. size="3" face="Arial">ust call the method </font><a
  1449. href="#ExecuteOperation"><font size="3" face="Arial"><b><i>ExecuteOperation</i></b></font></a><font
  1450. size="3" face="Arial"> of this component (for
  1451. child-classes: call </font><a href="#Execute"><font
  1452. size="3" face="Arial"><b><i>Execute</i></b></font></a><font
  1453. size="3" face="Arial">). Now, windows handles the
  1454. drag&amp;drop operation.</font></td>
  1455. </tr>
  1456. <tr>
  1457. <td valign="top">&nbsp;</td>
  1458. <td valign="top"><font face="Arial">6.</font></td>
  1459. <td valign="top"><font size="3" face="Arial">You may use
  1460. the events </font><a href="#OnGiveFeedback"><font
  1461. size="3" face="Arial"><b><i>OnGiveFeedback</i></b></font></a><font
  1462. size="3" face="Arial"> and </font><a
  1463. href="#OnQueryContinueDrag"><font size="3" face="Arial"><b><i>OnQueryContinueDrag</i></b></font></a><font
  1464. size="3" face="Arial">, but often you need not.</font></td>
  1465. </tr>
  1466. <tr>
  1467. <td valign="top">&nbsp;</td>
  1468. <td valign="top">&nbsp;</td>
  1469. <td valign="top">&nbsp;</td>
  1470. </tr>
  1471. <tr>
  1472. <td valign="top">&nbsp;</td>
  1473. <td valign="top" colspan="2"><font face="Arial"><strong>Hints:</strong></font></td>
  1474. </tr>
  1475. <tr>
  1476. <td valign="top">&nbsp;</td>
  1477. <td valign="top" colspan="2"><ul>
  1478. <li><font size="3" face="Arial">Drag&amp;drop
  1479. operations cannot be done at design-time!</font></li>
  1480. <li><font size="3" face="Arial">If you use the
  1481. drag-detection, it's high recommended to check
  1482. the section &quot;</font><a
  1483. href="#DragDetectionProblem"><font size="3"
  1484. face="Arial">Problems With The Drag-Detection</font></a><font
  1485. size="3" face="Arial">&quot;.</font></li>
  1486. </ul>
  1487. </td>
  1488. </tr>
  1489. <tr>
  1490. <td height="50">&nbsp;</td>
  1491. <td colspan="2">&nbsp;</td>
  1492. </tr>
  1493. </table>
  1494. <table border="0" width="600">
  1495. <tr>
  1496. <td width="10" bgcolor="#008080" height="10">&nbsp;</td>
  1497. <td rowspan="2" colspan="2" width="590"><font size="5"
  1498. face="Arial">How Do I Use It As Drag&amp;Drop Target</font></td>
  1499. </tr>
  1500. <tr>
  1501. <td>&nbsp;</td>
  1502. </tr>
  1503. <tr>
  1504. <td>&nbsp;</td>
  1505. <td valign="top"><font face="Arial">1.</font></td>
  1506. <td><font face="Arial">Drop a TWinControl on the form
  1507. (e.g. a listbox). </font></td>
  1508. </tr>
  1509. <tr>
  1510. <td>&nbsp;</td>
  1511. <td valign="top"><font face="Arial">2.</font></td>
  1512. <td><font face="Arial">Choose the TWinControl (listbox)
  1513. in </font><a href="#DragDropControl"><font face="Arial"><em><strong>DragDropControl</strong></em></font></a><font
  1514. face="Arial">.</font></td>
  1515. </tr>
  1516. <tr>
  1517. <td>&nbsp;</td>
  1518. <td valign="top"><font face="Arial">3. </font></td>
  1519. <td><font face="Arial">Choose the drag&amp;drop effects
  1520. under </font><a href="#TargetEffects"><font face="Arial"><em><strong>TargetEffects</strong></em></font></a><font
  1521. face="Arial"> that the <em><strong>DragDropControl </strong></em>(listbox)
  1522. should support. If you don't want any longer that the <em><strong>DragDropControl</strong></em>
  1523. serve as drag&amp;drop target all items must be set to
  1524. false.</font></td>
  1525. </tr>
  1526. <tr>
  1527. <td>&nbsp;</td>
  1528. <td valign="top"><font face="Arial">4.</font></td>
  1529. <td><font size="3" face="Arial">Now, you have to program
  1530. what happen, when the user drops a bitmap on your </font><a
  1531. href="#DragDropControl"><font size="3" face="Arial"><b><i>DragDropControl</i></b></font></a><font
  1532. size="3" face="Arial"> (listbox). For this, the best is
  1533. to use the event </font><a href="#OnDrop"><font size="3"
  1534. face="Arial"><b><i>OnDrop</i></b></font></a><font
  1535. size="3" face="Arial"> (or </font><a
  1536. href="#OnProcessDropped"><font size="3" face="Arial"><b><i>OnProcessDropped</i></b></font></a><font
  1537. size="3" face="Arial"> in the child-class; but only
  1538. there!). At first, you should check what drag&amp;drop
  1539. effect was chosen by the user. You get the effect from
  1540. method's parameter <b><i>dwEffect</i></b>. </font></td>
  1541. </tr>
  1542. <tr>
  1543. <td>&nbsp;</td>
  1544. <td valign="top"><font face="Arial">5.</font></td>
  1545. <td valign="top"><font size="3" face="Arial">You may use
  1546. the events </font><a href="#OnDragEnter"><font size="3"
  1547. face="Arial"><b><i>OnDragEnter</i></b></font></a><font
  1548. size="3" face="Arial">, </font><a href="#OnDragOver"><font
  1549. size="3" face="Arial"><b><i>OnDragOver</i></b></font></a><font
  1550. size="3" face="Arial"> and </font><a href="#OnDragLeave"><font
  1551. size="3" face="Arial"><b><i>OnDragLeave</i></b></font></a><font
  1552. size="3" face="Arial">, but often you need not.</font></td>
  1553. </tr>
  1554. <tr>
  1555. <td valign="top">&nbsp;</td>
  1556. <td valign="top">&nbsp;</td>
  1557. <td valign="top">&nbsp;</td>
  1558. </tr>
  1559. <tr>
  1560. <td valign="top">&nbsp;</td>
  1561. <td valign="top" colspan="2"><font face="Arial"><strong>Hints:</strong></font></td>
  1562. </tr>
  1563. <tr>
  1564. <td valign="top">&nbsp;</td>
  1565. <td valign="top" colspan="2"><ul>
  1566. <li><font size="3" face="Arial">Drag&amp;drop
  1567. operations cannot be done at design-time!</font></li>
  1568. </ul>
  1569. </td>
  1570. </tr>
  1571. <tr>
  1572. <td height="50">&nbsp;</td>
  1573. <td colspan="2">&nbsp;</td>
  1574. </tr>
  1575. </table>
  1576. <table border="0" width="600">
  1577. <tr>
  1578. <td width="10" bgcolor="#008080" height="10">&nbsp;</td>
  1579. <td rowspan="2" width="590"><font size="5" face="Arial">Some
  1580. Important Hints</font></td>
  1581. </tr>
  1582. <tr>
  1583. <td>&nbsp;</td>
  1584. </tr>
  1585. <tr>
  1586. <td>&nbsp;</td>
  1587. <td><ul>
  1588. <li><font size="3" face="Arial">Normally, you don't
  1589. use this component for drag&amp;drop. It's better
  1590. and mostly simpler to implement a child-class
  1591. like <em><strong>TDragDropFiles</strong></em> or <em><strong>TDragDropText</strong></em>.
  1592. You can design your own
  1593. drag&amp;drop/clipboard-formats, but for such
  1594. special formats and other formats, I don't
  1595. support, you must write an own child-class. But I
  1596. think, it shouldn't be so difficult with these
  1597. parent-classes, I offer you here.<br>
  1598. </font></li>
  1599. <li><font size="3" face="Arial">Don't start threads
  1600. in </font><a href="#OnDrop"><font size="3"
  1601. face="Arial"><b><i>OnDrop</i></b></font></a><font
  1602. size="3" face="Arial">, because this may causes
  1603. access violations. Mostly, you don't need a
  1604. thread - you can use </font><a
  1605. href="#OnProcessDropped"><font size="3"
  1606. face="Arial"><b><i>OnProcessDropped</i></b></font></a><font
  1607. size="3" face="Arial">.<br>
  1608. </font></li>
  1609. <li><font size="3" face="Arial">Don't try to start
  1610. OLE drag&amp;drop and Delphi internal's
  1611. drag&amp;drop at same time - it doesn't work. If
  1612. you want to drop additional data, you've to build
  1613. a own clipboard-format (RegisterClipboardFormat)
  1614. and new child-class. Sorry, I don't know an
  1615. easier way. <br>
  1616. </font></li>
  1617. <li><font size="3" face="Arial">If you do drag data
  1618. with the right mouse-button, you may get at some
  1619. TWinControls a context popup-menu (e.g. TMemo).
  1620. To avoid popping up the menu, define a own empty
  1621. menu and set its property &quot;AutoPopup&quot;
  1622. to false. Use the event </font><a
  1623. href="#OnDragDetect"><font size="3" face="Arial"><b><i>OnDragDetect</i></b></font></a><font
  1624. size="3" face="Arial"> to determine, when set the
  1625. TWinControl's property to the empty popup-menu or
  1626. nil. Here an exsample for TMemo:</font> </li>
  1627. </ul>
  1628. <blockquote>
  1629. <p><font size="3" face="Arial"><code><strong>procedure
  1630. </strong></code><code>TForm1.DragDropFilesEx1DragDetect(grfKeyState:
  1631. Longint; x,y: Integer; DragStatus:
  1632. TDragDetectStatus);</code><code><strong><br>
  1633. begin</strong></code></font></p>
  1634. <blockquote>
  1635. <p><font size="3" face="Arial"><code><strong>if (</strong></code><code>DragStatus=ddsCancelled)
  1636. </code><code><strong>or</strong></code><code>
  1637. (DragStatus=ddsDrag) </code><code><strong>then </strong></code><code>Memo1.PopupMenu:=PopupMenu1;</code><code><strong><br>
  1638. if </strong></code><code>DragStatus</code><code><strong>=</strong></code><code>ddsNone</code><code><strong>
  1639. then </strong></code><code>Memo1.PopupMenu:=</code><code><strong>nil</strong></code><code>;</code><code><strong><br>
  1640. if </strong></code><code>DragStatus=ddsDrag</code><code><strong>
  1641. then<br>
  1642. begin </strong></code></font></p>
  1643. </blockquote>
  1644. </blockquote>
  1645. <blockquote>
  1646. <blockquote>
  1647. <blockquote>
  1648. <p><font color="#000080" size="3"
  1649. face="Arial"><code><em><strong>// Prepare for
  1650. dragging<br>
  1651. // ...<br>
  1652. // An example for the child-class <br>
  1653. // DragDropText:</strong></em></code></font><font
  1654. size="3" face="Arial"><code><strong><br>
  1655. if </strong></code><code>Memo1.Lines.Count=0</code><code><strong>
  1656. then exit</strong></code><code>;</code><code><strong><br>
  1657. </strong></code><code>DragDropText1.Lines.Assign(Memo1.Lines);<br>
  1658. DragDropText1.Execute; </code></font></p>
  1659. </blockquote>
  1660. </blockquote>
  1661. </blockquote>
  1662. <blockquote>
  1663. <blockquote>
  1664. <p><font size="3" face="Arial"><code><strong>end</strong></code><code>;</code><code><strong>
  1665. </strong></code></font></p>
  1666. </blockquote>
  1667. </blockquote>
  1668. <blockquote>
  1669. <p><font size="3" face="Arial"><code><strong>end</strong></code><code>;</code><code><strong>
  1670. </strong></code></font></p>
  1671. </blockquote>
  1672. </td>
  1673. </tr>
  1674. <tr>
  1675. <td height="50">&nbsp;</td>
  1676. <td>&nbsp;</td>
  1677. </tr>
  1678. </table>
  1679. <table border="0" width="600">
  1680. <tr>
  1681. <td width="10" bgcolor="#008080" height="10">&nbsp;</td>
  1682. <td rowspan="2" colspan="2" width="590"><font size="5"
  1683. face="Arial">How To Build An Own Child-Class</font></td>
  1684. </tr>
  1685. <tr>
  1686. <td>&nbsp;</td>
  1687. </tr>
  1688. <tr>
  1689. <td>&nbsp;</td>
  1690. <td colspan="2"><font size="3" face="Arial">Before you
  1691. build your own child-class, it's very useful to
  1692. understand the mechanism of drag&amp;drop. <p><font size="3"
  1693. face="Arial">Use my &quot;Drag&amp;Drop-Analyser&quot;
  1694. for testing &amp; analysing the dropped data. You can use
  1695. it as target of drag&amp;drop operations. It gives
  1696. informations about the dropped data.</font></p>
  1697. <p><font size="3" face="Arial">You have not to do much,
  1698. if you build a child-class like <em><strong>TDragDropFiles</strong></em>
  1699. or <em><strong>TDragDropText</strong></em>. You must only
  1700. build a child-class from <b><i>TEnumFormatEtc</i></b>, <b><i>TDataObject</i></b>
  1701. and <b><i>TDragDrop</i></b>. and override the following
  1702. methods, the rest of the work, I've already done:</font> </p>
  1703. <blockquote>
  1704. <p><font size="3" face="Arial"><b><i>TDataObject:<br>
  1705. </i></b><code><b>function</b></code><code>
  1706. RenderData(var FormatEtc:TFormatEtc; var StgMedium:
  1707. TStgMedium):HResult; </code></font></p>
  1708. <p><font size="3" face="Arial"><b><i>TDropTarget:</i></b><code><b><br>
  1709. procedure</b></code><code> AccepTDataObject(DataObj:
  1710. IDataObject; grfKeyState: Longint; pt: TPoint; var
  1711. dwEffect: longint; var Accept:boolean);</code><code><b><br>
  1712. procedure</b></code><code> RenderDropped(DataObj:
  1713. IDataObject; grfKeyState: Longint; pt: TPoint; var
  1714. dwEffect: longint); </code></font></p>
  1715. <p><font size="3" face="Arial"><b><i>TDragDrop:</i></b><code><b><br>
  1716. function</b></code><code>
  1717. CreateDataObject:TDataObject;</code></font></p>
  1718. </blockquote>
  1719. </td>
  1720. </tr>
  1721. <tr>
  1722. <td height="50">&nbsp;</td>
  1723. <td colspan="2">&nbsp;</td>
  1724. </tr>
  1725. </table>
  1726. <table border="0" width="600">
  1727. <tr>
  1728. <td width="10" bgcolor="#008080" height="10">&nbsp; </td>
  1729. <td rowspan="2"><a name="Details about the context-menu"><font
  1730. size="5" face="Arial">Details about the <strong>context-menu</strong></font></a></td>
  1731. </tr>
  1732. <tr>
  1733. <td>&nbsp;</td>
  1734. </tr>
  1735. <tr>
  1736. <td>&nbsp;</td>
  1737. <td><font size="3" face="Arial">With the context-menu are
  1738. following properties, events and methods involved: </font><a
  1739. href="#TargetPopUpMenu"><font size="3" face="Arial"><em><strong>TargetPopUpMenu</strong></em></font></a><font
  1740. size="3" face="Arial">, </font><a href="#OnMenuDestroy"><font
  1741. size="3" face="Arial"><em><strong>OnMenuDestroy</strong></em></font></a><font
  1742. size="3" face="Arial">, </font><a href="#OnMenuExecCmd"><font
  1743. size="3" face="Arial"><em><strong>OnMenuExecCmd</strong></em></font></a><font
  1744. size="3" face="Arial">, </font><a href="#OnMenuPopup"><font
  1745. size="3" face="Arial"><em><strong>OnMenuPopup</strong></em></font></a><font
  1746. size="3" face="Arial">, </font><a href="#OnMenuSucceeded"><font
  1747. size="3" face="Arial"><em><strong>OnMenuSucceeded</strong></em></font></a><font
  1748. size="3" face="Arial">, </font><a href="#DoMenuDestroy"><font
  1749. size="3" face="Arial"><em><strong>DoMenuDestroy</strong></em></font></a><font
  1750. size="3" face="Arial">, </font><a href="#DoMenuExecCmd"><font
  1751. size="3" face="Arial"><em><strong>DoMenuExecCmd</strong></em></font></a><font
  1752. size="3" face="Arial"> and </font><a href="#DoMenuPopup"><font
  1753. size="3" face="Arial"><em><strong>DoMenuPopup</strong></em></font></a><font
  1754. size="3" face="Arial">. The context-menu does only
  1755. appear, if </font><a href="#TargetPopUpMenu"><font
  1756. size="3" face="Arial"><em><strong>TargetPopUpMenu</strong></em></font></a><font
  1757. size="3" face="Arial"> is set to true and the data is
  1758. dragged with the right mousebutton. Override the methods
  1759. (<em><strong>DoXXXXXXX</strong></em> ), if you write a
  1760. custom component based on <em><strong>TDragDrop</strong></em>
  1761. otherwise use the events (<em><strong>OnXXXXXXX</strong></em>).</font><p><font
  1762. size="3" face="Arial">The order of the called
  1763. methods/events after a drop is as following: First, <em><strong>xxMenuPopup</strong></em>
  1764. (the &quot;<em><strong>xx</strong></em>&quot; stand for
  1765. &quot;<em><strong>Do</strong></em>&quot; and &quot;<em><strong>On</strong></em>&quot;)
  1766. is called. You implement in <em><strong>xxMenuPopup</strong></em>
  1767. your custom menuitems. Here is an example:</font></p>
  1768. <blockquote>
  1769. <p><font face="Arial"><code><strong>var</strong></code><code>
  1770. MinCustCmd:integer;</code></font></p>
  1771. <p><font face="Arial"><code><strong>procedure</strong></code><code>
  1772. TForm1.DragDropFilesEx1MenuPopup(Sender: TObject;
  1773. AMenu: HMENU; DataObj: IDataObject; AMinCustCmd,
  1774. grfKeyState: Integer; pt: TPoint);<br>
  1775. </code><code><strong>var</strong></code><code>
  1776. lpmii:TMenuItemInfo;<br>
  1777. </code><code><strong>begin</strong></code></font></p>
  1778. <blockquote>
  1779. <p><font face="Arial"><code>MinCustCmd:=AMinCustCmd;
  1780. </code></font><font color="#000080" face="Arial"><code><em><strong>//
  1781. we need this value later, so the variable must be
  1782. global</strong></em></code></font><font
  1783. face="Arial"><code><br>
  1784. fillchar(lpmii,sizeof(lpmii),0);<br>
  1785. lpmii.cbSize:=sizeof(lpmii);<br>
  1786. lpmii.fMask:=MIIM_TYPE </code><code><strong>or</strong></code><code>
  1787. MIIM_ID;<br>
  1788. lpmii.wID:=AMinCustCmd;<br>
  1789. lpmii.fType:=MFT_STRING;<br>
  1790. lpmii.dwTypeData:=</code></font><font
  1791. color="#0000FF" face="Arial"><code>'</code></font><font
  1792. color="#0000A0" face="Arial"><code>&amp;test
  1793. item'</code></font><font face="Arial"><code>;<br>
  1794. lpmii.cch:=length(</code></font><font
  1795. color="#0000A0" face="Arial"><code>'&amp;test
  1796. item'</code></font><font face="Arial"><code>);<br>
  1797. MinCustCmd:=AMinCustCmd;<br>
  1798. InsertMenuItem(AMenu,0,true,lpmii);</code></font></p>
  1799. </blockquote>
  1800. <p><font face="Arial"><code><strong>end</strong></code><code>;</code></font></p>
  1801. </blockquote>
  1802. <p><font size="3" face="Arial">If you override the method
  1803. <em><strong>DoMenuPopup</strong></em>, you also must
  1804. call:</font></p>
  1805. <blockquote>
  1806. <p><font size="3" face="Arial"><code><strong>inherited</strong></code><code>
  1807. DoMenuPopup(Sender, AMenu, DataObj, AMinCustCmd,
  1808. grfKeyState, pt);</code></font></p>
  1809. </blockquote>
  1810. <p><font size="3" face="Arial">You find more information
  1811. on adding items to a popup-menu in the Win32-help. Look
  1812. for &quot;InsertMenuItem&quot;. If you add more items,
  1813. you must increase AMinCustCmd for every new item, to
  1814. identify the items later! Of course, you must remember
  1815. the ID to all items or you don't know, which item was
  1816. selected!</font></p>
  1817. <p><font size="3" face="Arial"><em><strong>xxMenuExecCmd</strong></em>
  1818. is only called, if it was detected, that one of your
  1819. custom menuitems was selected. Now, you have to executed
  1820. the routines etc, which are linked with the selected
  1821. menuitem. Here the continue of the example:</font></p>
  1822. <blockquote>
  1823. <p><font size="3" face="Arial"><code><strong>procedure</strong></code><code>
  1824. TForm1.DragDropFilesEx1MenuExecCmd(Sender: TObject;
  1825. AMenu: HMENU;DataObj: IDataObject; Command: Integer;
  1826. var dwEffect: Integer; </code><code><strong>var</strong></code><code>
  1827. Succeeded: Boolean);<br>
  1828. </code><code><strong>begin</strong></code></font></p>
  1829. <blockquote>
  1830. <p><font size="3" face="Arial"><code>Succeeded:=Command=MinCustCmd;<br>
  1831. </code><code><strong>if</strong></code><code>
  1832. Succeeded </code><code><strong>then</strong></code><code>
  1833. ShowMessage(</code></font><font color="#0000A0"
  1834. size="3" face="Arial"><code>'The test item was
  1835. selected!'</code></font><font size="3"
  1836. face="Arial"><code>);</code></font></p>
  1837. </blockquote>
  1838. <p><font size="3" face="Arial"><code><strong>end</strong></code><code>;</code></font></p>
  1839. </blockquote>
  1840. <p><font size="3" face="Arial">Don't forget to set the
  1841. parameter <strong>Succeeded</strong>. Set only the value
  1842. to true </font><font color="#FF0000" size="3"
  1843. face="Arial"><strong>after</strong></font><font size="3"
  1844. face="Arial"> the routine was successfully executed. If
  1845. you override the method <em><strong>DoMenuExecCmd</strong></em>,
  1846. you also must call the inherited method!</font></p>
  1847. <p><font size="3" face="Arial"><em><strong>xxMenuSucceeded</strong></em>
  1848. is only called, if the routines in <em><strong>xxMenuExecCmd</strong></em>
  1849. were successfully executed. This notification is helpful,
  1850. if you must update the display after successful update.
  1851. If you override the method <em><strong>DoMenuSucceeded</strong></em>,
  1852. you also must call the inherited method!</font></p>
  1853. <p><font size="3" face="Arial"><em><strong>xxMenuDestroy</strong></em>
  1854. is called after all. Now, it's time to de-intialize
  1855. everything what you've initialized in <em><strong>xxMenuPopup</strong></em>.
  1856. Here the continue of the example:</font></p>
  1857. <blockquote>
  1858. <p><font size="3" face="Arial"><code><strong>procedure</strong></code><code>
  1859. TForm1.DragDropFilesEx1MenuDestroy(Sender: TObject;
  1860. AMenu: HMENU);<br>
  1861. </code><code><strong>begin</strong></code></font></p>
  1862. <blockquote>
  1863. <p><font size="3" face="Arial"><code><strong>if</strong></code><code>
  1864. DeleteMenu(AMenu,MinCustCmd,MF_BYCOMMAND) </code><code><strong>then</strong></code><code>
  1865. messagebeep(0);</code></font></p>
  1866. </blockquote>
  1867. <p><font size="3" face="Arial"><code><strong>end</strong></code><code>;</code></font></p>
  1868. </blockquote>
  1869. <p><font size="3" face="Arial">If you override the method
  1870. <em><strong>DoMenuDestroy</strong></em>, you also must
  1871. call the inherited method!</font></p>
  1872. </td>
  1873. </tr>
  1874. <tr>
  1875. <td height="50">&nbsp;</td>
  1876. <td>&nbsp;</td>
  1877. </tr>
  1878. </table>
  1879. <table border="0" width="600">
  1880. <tr>
  1881. <td width="10" bgcolor="#008080" height="10">&nbsp; </td>
  1882. <td rowspan="2" width="590"><a
  1883. name="Details about the DropHandler"><font size="5"
  1884. face="Arial">Details about the <strong>DropHandler</strong></font></a></td>
  1885. </tr>
  1886. <tr>
  1887. <td>&nbsp;</td>
  1888. </tr>
  1889. <tr>
  1890. <td>&nbsp;</td>
  1891. <td><font size="3" face="Arial">The method <em><strong>DropHandler</strong></em>
  1892. was implemented to allow alternative handling of the
  1893. dropped data. This is especially important for
  1894. implementing shell extentions. Was a drophandler
  1895. successfully called, the event <em><strong>OnDropHandlerSucceeded</strong></em>
  1896. is triggered. You can only use the the <em><strong>DropHandler
  1897. </strong></em>only, if you inherit the class <em><strong>TDragDrop</strong></em>.
  1898. Mostly, the coding in the method <em><strong>DropHandler</strong></em>
  1899. is nearly similar with that in the method <em><strong>RenderDropped</strong></em>.
  1900. First, you will render the dropped data, then you will
  1901. handle the data. You don't do more in this method, and
  1902. you cannot do more!</font></td>
  1903. </tr>
  1904. <tr>
  1905. <td height="50">&nbsp;</td>
  1906. <td>&nbsp;</td>
  1907. </tr>
  1908. </table>
  1909. <table border="0" width="600">
  1910. <tr>
  1911. <td width="10" bgcolor="#008080" height="10">&nbsp;</td>
  1912. <td rowspan="2" width="590"><font size="5" face="Arial">FAQ</font></td>
  1913. </tr>
  1914. <tr>
  1915. <td>&nbsp;</td>
  1916. </tr>
  1917. <tr>
  1918. <td>&nbsp;</td>
  1919. <td><font size="3" face="Arial"><b>Q:</b> I want a single
  1920. component to be the target of more than one type of drag,
  1921. what can I do? One always overrides the other. If I use
  1922. the TDragDrop, where is the information about what was
  1923. dropped?</font> <p><font size="3" face="Arial"><b>A:</b>
  1924. You've to write your own child-class from TDragDrop. But
  1925. you can copy the most of my child-classes together, for
  1926. faster developing your class.</font></p>
  1927. <p><font size="3" face="Arial">You can't access the
  1928. dropped data directly. For this you have the class
  1929. TDataObject (look at params of methods ...). You have
  1930. format description for every data(-set) in your data
  1931. object . You can enumerate the available formats with
  1932. EnumFormatEtc. With &quot;QueryGetData&quot; you can
  1933. check, if a special format is available. The data itself
  1934. you can get with &quot;GetData&quot;. Because of my
  1935. components design you should better use my new introduced
  1936. method &quot;RenderData&quot;.</font></p>
  1937. <p><font size="3" face="Arial">I hope, it helps a little
  1938. bit. Don't be disappointed, if you don't understand
  1939. drag&amp;drop immediately. I've even needed some months
  1940. to understand the mechanisms completely. </font></p>
  1941. </td>
  1942. </tr>
  1943. <tr>
  1944. <td height="50">&nbsp;</td>
  1945. <td>&nbsp;</td>
  1946. </tr>
  1947. </table>
  1948. <table border="0" width="600">
  1949. <tr>
  1950. <td width="10" bgcolor="#008080" height="10">&nbsp;</td>
  1951. <td rowspan="2" width="590"><a
  1952. name="DragDetectionProblem"><font size="5" face="Arial">Problems
  1953. With The Drag-Detection</font></a></td>
  1954. </tr>
  1955. <tr>
  1956. <td>&nbsp;</td>
  1957. </tr>
  1958. <tr>
  1959. <td>&nbsp;</td>
  1960. <td><font face="Arial">I got reports, that some controls
  1961. e.g. listboxes or grids make trouble in some situations
  1962. with the drag-detection. This behaviour results of a to
  1963. old or just incompatible implementation of events in the
  1964. controls. In such a case you must write a workaround.
  1965. Mostly, following helps:</font><blockquote>
  1966. <p><font color="#000080" face="Arial"><code><em><strong>//
  1967. The type of &quot;P&quot; is TPoint</strong></em></code></font><font
  1968. face="Arial"><code><br>
  1969. GetCursorPos(P);<br>
  1970. P := ScreenToClient(P);<br>
  1971. SendMessage(&lt;control&gt;.Handle,WM_LBUTTONUP,0<br>
  1972. &nbsp;&nbsp;&nbsp;,Longint(PointToSmallPoint(P)));</code></font></p>
  1973. </blockquote>
  1974. <p><font face="Arial">In some cases e.g. with grids this
  1975. doesn't work. In these cases you must do a little bit
  1976. more, as I show you the demo &quot;</font><font size="3"
  1977. face="Arial">GridFixDemo.zip</font><font face="Arial">&quot;.
  1978. Mostly, the workaround isn't really difficult to write.</font></p>
  1979. </td>
  1980. </tr>
  1981. <tr>
  1982. <td height="50">&nbsp;</td>
  1983. <td>&nbsp;</td>
  1984. </tr>
  1985. </table>
  1986. <table border="0" width="600">
  1987. <tr>
  1988. <td width="10" bgcolor="#008080" height="10">&nbsp;</td>
  1989. <td rowspan="2" width="590"><font size="5" face="Arial">Known
  1990. Bugs</font></td>
  1991. </tr>
  1992. <tr>
  1993. <td>&nbsp;</td>
  1994. </tr>
  1995. <tr>
  1996. <td>&nbsp;</td>
  1997. <td><ul>
  1998. <li><a name="WinNTBug1"><font size="3" face="Arial">Only
  1999. with WinNT4: I got the report, that it is
  2000. impossible to discover which drop effect has
  2001. effected (important when using <b><i>Execute</i></b>)</font></a>
  2002. </li>
  2003. <li><font size="3" face="Arial">If you you have
  2004. problems with the drag-detection, check the
  2005. section &quot;</font><a
  2006. href="#DragDetectionProblem"><font size="3"
  2007. face="Arial">Problems With The Drag-Detection</font></a><font
  2008. size="3" face="Arial">&quot;</font>.</li>
  2009. </ul>
  2010. </td>
  2011. </tr>
  2012. <tr>
  2013. <td height="50">&nbsp;</td>
  2014. <td>&nbsp;</td>
  2015. </tr>
  2016. </table>
  2017. <hr>
  2018. <p><font size="3" face="Arial"><i>© 1998,99 by </i></font><a
  2019. href="mailto:[email protected]"><font size="3" face="Arial"><i>Dieter
  2020. Steinwedel</i></font></a><font size="3" face="Arial"> </font></p>
  2021. <p><a href="Index.htm"><font face="Arial">Back</font></a><font
  2022. face="Arial"> to index</font></p>
  2023. </body>
  2024. </html>