Cross-application drag-and-drop in Delphi

一曲冷凌霜 提交于 2019-11-26 18:20:56

问题


I would like to create a Delphi application for Windows XP which allows dropping of files dragged from Windows Explorer (the Desktop or folder windows) or other applications which support this operation (such as Total Commander). What about vice-versa? When the user drags an icon from my application, I should be able to set the contents of the dragged object to custom data.

My goal is to create a custom application toolbar, onto which I can drop applications and show their icons or drag applications or other entities from it.

How can this be done?


回答1:


This can be done with The Drag and Drop Component Suite. It also has examples for what you want.




回答2:


Raymond Chen has a nice series of articles about drag&drop:

  • What a drag Archives | The Old New Thing
  • What a drag: Dragging a virtual file (HGLOBAL edition)
  • What a drag: Dragging a virtual file (IStorage edition)
  • What a drag: Dragging a virtual file (IStream edition)

There are many other good articles on his blog when you search for drag and drop.



来源:https://stackoverflow.com/questions/295259/cross-application-drag-and-drop-in-delphi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!