How can I create a IDataObject instance with Delphi?

别来无恙 提交于 2019-12-10 23:57:16

问题


This C++ code shows how OLE can be used to simulate a file drag and drop to simulate a 'Send to...' operation. This will open the standard mail client with the selected file(s) as an attachment, a very interesting alternative to the mailto: protocol handler.

Which is the best (short and safe) way to create the neccessary instance of IDataObject in Delphi?

I have found some code here but maybe there is a better solution.


回答1:


Porting the C++ code to Delphi probably isn't too difficult. Start with

type
  TDataObject = class(TInterfacedObject, IDataObject)

and implement the required methods as shown in the C++ example.



来源:https://stackoverflow.com/questions/976727/how-can-i-create-a-idataobject-instance-with-delphi

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