🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.nativeapi
Article #12084

Custom Drop Effects

#12084
From: Duncan M Gunn
Date: Mon, 25 Nov 2002 13:49
36 lines
2256 bytes
Hi,

I've added OLE drag and drop functionality to my application.  I want to add
custom drop effects, but I'm not sure if such a thing exists!

As far as I understand it the way it works is this:

DropTarget::DragOver is called, which does various hit-testing and sets
dwEffect to the required value.  DropSource::GiveFeedback is then called,
which changes the mouse cursor according to dwEffect.

I want to display a custom mouse cursor, for a custom effect, but wonder how
I can achieve this.  As far as I could see, the parameters passed to
dwEffect have to be of the standard DROPEFFECT enumeration.  This would mean
I could only display mouse cursors based on these effects.

I wondered if I should query the DataObject for MyDataObject, and change the
mouse cursor in the DropTarget::DragOver instead.  Also, on
DropTarget::Drop, query again for MyDataObject and do my hit-testing again.
This seems wrong to me, I thought I would be able to modify dwEffect in
DragOver to my custom drop effect, modify the cursor accordingly in
GiveFeedback, and then in Drop, execute the action according to this custom
dwEffect parameter.

Can I extend the DROPEFFECT enumeration, and how?  What is the correct
approach?

Thanks for your help,


--
Duncan M. Gunn
Development Engineer
Gael Quality Ltd.
www.gaelquality.co.uk
www.ygnius.com
Technical Details
Message-ID: <3de22a68@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f94dd,2c482a728a6886fc,start
X-Google-Attributes: gidf94dd,public
X-Google-ArrivalTime: 2002-11-25 06:15:49 PST
From: "Duncan M Gunn" <gunnd@gaelqualityNOSPAM.co.uk>
Newsgroups: borland.public.delphi.nativeapi
Subject: Custom Drop Effects
Date: Mon, 25 Nov 2002 13:49:32 -0000
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 212.125.66.142
Message-ID: <3de22a68@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1038232168 212.125.66.142 (25 Nov 2002 05:49:28 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail