🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3066

Re: How to accept Drag 'n Drop from Outlook Express or any other application besides the Explorer...?

#3066
From: Remy Lebeau (TeamB)
Date: Wed, 20 Sep 2006 03:41
38 lines
2511 bytes
"Oren Halvani" <Spam@halvani.de> wrote in message
news:45109658@newsgroups.borland.com...

> can someone explain me what i should do if i want my programm
> to accept Drag 'n Drop from Outlook Express (for instance:
> E-Mails or News-posts) or any other application ?

What you are asking for is VASTLY more complex to implement than what you
were using before.  You have to write a class that inherits from the
IDropTarget interface, and then use RegiserDragDrop() to let the OS know
about it.  When another application wants to begin a Drag&Drop operation, it
has to call DoDragDrop().  When an item is dragged over your application and
then dropped, the variable methods of the IDropTarget interface will be
called inside your application.  You can then retrieve the data from the
provided IDataObject interface.

Please go to http://www.deja.com and search through the newsgroup archives.
This topic has been discussed many times before.

> Do i need to catch the Drag 'n Drop message of each specific application

No, because there are no messages involved to begin with.

> I've noticed, Drag 'n Drop of text into my program works from the
> most applications that use lke my program the RichEdit control...

That kind of Drag&Drop operation is handled by the RichEdit control itself
at the OS layer.

> why can't I do the same Drag 'n Drop for other things like: E-Mails
> from Outlook Express or Thunderbird, etc... ?

Because you are approaching the issue from the wrong direction.  Such data
requires a completely different approach, as described above.


Gambit
Technical Details
Message-ID: <4510b9e4@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <45109658@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8ecf2bd78c9968e3
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <45109658@newsgroups.borland.com>
Subject: Re: How to accept Drag 'n Drop from Outlook Express or any other application besides the Explorer...?
Date: Tue, 19 Sep 2006 20:41:22 -0700
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 69.169.4.232
Message-ID: <4510b9e4@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1158724068 69.169.4.232 (19 Sep 2006 20:47:48 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail