Article View: borland.public.cppbuilder.nativeapi
Article #5014Re: Dragging from application to explorer part 2
From: Damon Chandler (TeamB)
Date: Thu, 27 Oct 2005 15:51
Date: Thu, 27 Oct 2005 15:51
34 lines
2568 bytes
2568 bytes
Hi Sefano, Providing the list of files via CF_HDROP (i.e., a DROPFILES structure) is fine, but you'll need to implement the IEnumFORMATETC interface (e.g., create a TBasicEnumFORMATETC class), and then return an instance to IEnumFORMATETC via the TBasicDataObject::EnumFormatEtc() method. This method is called by Explorer to determine what formats you can provide. The following page provides a rough example that should get you started... http://www.codeproject.com/shell/sendtomail.asp See the section "IDataObject implementation." Let me know if you can't get things working, and I'll post an example. Cheers, -- Damon (TeamB) C++Builder Developer's Journal http://bcbjournal.com BCB Commonly Asked Questions http://bcbjournal.com/bcbcaq Stefano Bonifazi wrote: > In a my previous thread on this newsgroup (Dragging from application to > explorer) I slightly modified Mr. Damon Chandler's sample about using his > DragSourcePack to make it able to drag "file names" to other applications by > changing the CF_TEXT support into CF_HDROP' one. > My problem now is that even if all applications seems to like that, and work > fine when I drag a "file list" from a my application and drop into them, > windows explorer refuses and does nothing :( > I don't know if I have to change the format to another one (and registering > it) ...
Technical Details
Message-ID:
<4360f6a8$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!atl-c02.usenetserver.com!news.usenetserver.com!atl-c07.usenetserver.com!news.usenetserver.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<435cfa68@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,69ce42933ddd83bf X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Thu, 27 Oct 2005 11:51:39 -0400 From: "Damon Chandler (TeamB)" <editor@_REMOVE_THIS_SPAM_GUARD_bcbjournal.com> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Dragging from application to explorer part 2 References: <435cfa68@newsgroups.borland.com> In-Reply-To: <435cfa68@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.58.13.186 Message-ID: <4360f6a8$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1130428072 24.58.13.186 (27 Oct 2005 08:47:52 -0700) Lines: 34 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!atl-c02.usenetserver.com!news.usenetserver.com!atl-c07.usenetserver.com!news.usenetserver.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail