drag drop from app to explorer with delayed file creation

N

Nick

Hi,

I am developping an app using managed C++. I want to be able to do a
drag drop from the app to windows explorer. The files to be dropped
onto explorer do not exist yet, the files are to be created by the app
when the user does the drop into explorer.

I have done some searches and found COleDataSource::DelaySetData could
be useful but this is MFC and I can't find the equivalent in .NET.

Anyone know the .NET equivalent for DelaySetData or any other way I can
accomplish what I want to do?

Many thanks,
Nick
 
D

Doug Harrison [MVP]

Hi,

I am developping an app using managed C++. I want to be able to do a
drag drop from the app to windows explorer. The files to be dropped
onto explorer do not exist yet, the files are to be created by the app
when the user does the drop into explorer.

I have done some searches and found COleDataSource::DelaySetData could
be useful but this is MFC and I can't find the equivalent in .NET.

Anyone know the .NET equivalent for DelaySetData or any other way I can
accomplish what I want to do?

Many thanks,
Nick

I think you need to handle CFSTR_FILECONTENTS as described here:

http://msdn.microsoft.com/library/d...ing/transferring/datascenarios.asp?frame=true
http://msdn.microsoft.com/library/d...basics_programming/transferring/clipboard.asp

The .NET object you would use is DataObject, but according to this message
(7/2003), it doesn't support the CFSTR:

http://groups.google.com/group/micr...6fb21491bd/85f6cdf119d9f156?#85f6cdf119d9f156

That message essentially recommends reinventing COleDataSource. Maybe
codeproject.com can help you more with this. For example, Nish's article
shows how to do this with COleDataSource:

http://www.codeproject.com/tips/ExplorerDelayDrop.asp?df=100&forumid=340689&exp=0&select=1724080
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top