Article View: borland.public.cppbuilder.nativeapi
Article #13526Re: OnDragOver of TForm
From: Remy Lebeau (TeamB)
Date: Wed, 08 Oct 2003 04:13
Date: Wed, 08 Oct 2003 04:13
28 lines
2130 bytes
2130 bytes
"Jonathan Starr" <starr@belsoft.com> wrote in message news:3f838962$1@newsgroups.borland.com... > I have a Multiple Document Interface app. I assign a handler for > OnDragOver for the main form. I run the app, and drag a file > from the desktop to the app's main form. The handler does not > get called. It is not supposed to be. The OnDrag... events are only for the VCL's own use when dragging VCL controls around within the application itself. They are not meant for interacting with the rest of the system at all. For what you ask, you need to either: 1) call DragAcceptFiles() at program startup and then intercept WM_DROPFILES messages, using DragQueryFile() and DragQueryPoint() to obtain information about each dropped file (this is the easier way to go). 2) Create your own IDropTarget-derived object and then call RegisterDragDrop() at program startup and RevokeDragDrop() at program termination. When a drop occurs, your IDropTarget will be called into by the system to handle the operation (this is the way Microsoft recommends people to go). All of this is documented in the Win32 API documentation. Gambit
Technical Details
Message-ID:
<3f838ea7$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f838962$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,aaa93bc126f41235 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-07 21:40:05 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f838962$1@newsgroups.borland.com> Subject: Re: OnDragOver of TForm Date: Tue, 7 Oct 2003 21:13:56 -0700 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.22.137.75 Message-ID: <3f838ea7$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1065586343 67.22.137.75 (7 Oct 2003 21:12:23 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail