Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / January 2007

Tip: Looking for answers? Try searching our database.

drag drop from app to explorer with delayed file creation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nick - 17 Jan 2007 15:11 GMT
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
Doug Harrison [MVP] - 17 Jan 2007 18:46 GMT
>Hi,
>
[quoted text clipped - 11 lines]
>Many thanks,
>Nick

I think you need to handle CFSTR_FILECONTENTS as described here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platfor
m/shell/programmersguide/shell_basics/shell_basics_programming/transferring/data
scenarios.asp?frame=true

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platfor
m/shell/programmersguide/shell_basics/shell_basics_programming/transferring/clip
board.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/microsoft.public.dotnet.framework.windowsforms/br
owse_frm/thread/6c3ac66fb21491bd/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


Signature

Doug Harrison
Visual C++ MVP


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.