Dragging and dropping a .WAV from Delphi App to other apps

Is there an easy way to drag a .WAV file from a Delphi 2006 App to another 
app.     It's not from a listbox or anything like that.   It's from a custom 
window.  My code would need to be responsible for generating a .WAV file 
based on where the person initially clicked on a window.

Is the only way to drop a file from a Delphi 2006 to use complicated COM 
routines?   If so, then would the other app that receives the file need 
complicated com routines too, or would it work with any app that could 
accept a the same dropped file type from Explorer?


Thanks.
0
Jeff
8/28/2009 5:46:48 PM
embarcadero.delphi.win32 2183 articles. 0 followers. Follow

4 Replies
1111 Views

Similar Articles

[PageSpeed] 51

"Jeff Yankauer" <jeff2333@verizon.net> wrote in message 
news:155794@forums.codegear.com...

> Is there an easy way to drag a .WAV file from a Delphi 2006 App
> to another app.

Not an *easy* way, no.  You need to write two classes that implement the 
IDropSource and IDataObject interfaces (or use third-party classes, such as 
from Anders Melander's Drag-and-Drop suite, 
http://melander.dk/delphi/dragdrop), and then your code needs to call the 
Win32 API DoDragDrop() function when it detects that a drag&drop operation 
needs to take place.  The IDataObject object needs to contain information 
about the .WAV file and its contents.  Any app that implements the 
IDropTarget will then be able to accept the drag and extract the data as 
needed.

> Is the only way to drop a file from a Delphi 2006 to use complicated
> COM routines?

Yes.

> If so, then would the other app that receives the file need complicated
> com routines too

Yes.

> would it work with any app that could accept a the same dropped file type
> from Explorer?

Windows Explorer uses the same kind of COM routines for its own 
drag-and-drop operations.  IDropSource, IDropTarget, and IDataObject are the 
preferred way to drag/drop data around in Windows.

-- 
Remy Lebeau (TeamB)
0
Remy
8/28/2009 6:44:21 PM
Thanks for the reply.   I tried that toolkit and it works.  I'm wondering if 
you there might be a way to have my app drag and drop a file onto another 
app but render the file at the time the file is dropped rather than the file 
needing to already be written to disk at the full file size before 
initiating the drag and drop?

Thanks,

Jeff


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:155833@forums.codegear.com...
> "Jeff Yankauer" <jeff2333@verizon.net> wrote in message 
> news:155794@forums.codegear.com...
>
>> Is there an easy way to drag a .WAV file from a Delphi 2006 App
>> to another app.
>
> Not an *easy* way, no.  You need to write two classes that implement the 
> IDropSource and IDataObject interfaces (or use third-party classes, such 
> as from Anders Melander's Drag-and-Drop suite, 
> http://melander.dk/delphi/dragdrop), and then your code needs to call the 
> Win32 API DoDragDrop() function when it detects that a drag&drop operation 
> needs to take place.  The IDataObject object needs to contain information 
> about the .WAV file and its contents.  Any app that implements the 
> IDropTarget will then be able to accept the drag and extract the data as 
> needed.
>
>> Is the only way to drop a file from a Delphi 2006 to use complicated
>> COM routines?
>
> Yes.
>
>> If so, then would the other app that receives the file need complicated
>> com routines too
>
> Yes.
>
>> would it work with any app that could accept a the same dropped file type
>> from Explorer?
>
> Windows Explorer uses the same kind of COM routines for its own 
> drag-and-drop operations.  IDropSource, IDropTarget, and IDataObject are 
> the preferred way to drag/drop data around in Windows.
>
> -- 
> Remy Lebeau (TeamB)
0
Jeff
8/31/2009 5:05:41 PM
Jeff Yankauer schrieb:

> Thanks for the reply.   I tried that toolkit and it works.  I'm wondering if 
> you there might be a way to have my app drag and drop a file onto another 
> app but render the file at the time the file is dropped rather than the file 
> needing to already be written to disk at the full file size before 
> initiating the drag and drop?

You can try to use other than file references in OLE drag&drop. It only 
requires that both the sender and receiver can handle your object type.

DoDi
0
Hans
8/31/2009 5:42:39 PM
"Jeff Yankauer" <jeff2333@verizon.net> wrote in message 
news:156810@forums.codegear.com...

> Thanks for the reply.   I tried that toolkit and it works.  I'm wondering
> if you there might be a way to have my app drag and drop a file onto
> another app but render the file at the time the file is dropped rather
> than the file needing to already be written to disk at the full file size
> before initiating the drag and drop?

In general, the IDataObject that is passed around during the drag&drop 
operation needs to include CFSTR_FILECONTENTS and CFSTR_FILEDESCRIPTOR 
items, where the CFSTR_FILEDESCRIPTOR contains descriptive information about 
the file (filename, size, etc) and the CFSTR_FILECONTENTS contains an 
IStream or IStorage object that provides the actual file data.  That way, 
you can store your data anywhere you want (in memory, in a database, etc), 
and pull it out on an as-needed basis when the target of the drag&drop 
operation actually tries to read it.  Refer to MSDN for more details:

    Shell Clipboard Formats
    http://msdn.microsoft.com/en-us/library/bb776902.aspx

    Handling Shell Data Transfer Scenarios
    http://msdn.microsoft.com/en-us/library/bb776904.aspx

I don't know how to accomplish that with Ander's toolkit, though.  You would 
likely have to make use of the TFileGroupDescritorClipboardFormat and 
TFileContents...ClipboardFormat (such as 
TFileContentsStreamOnDemandClipboardFormat) classes, but I don't know how 
exactly.

-- 
Remy Lebeau (TeamB)
0
Remy
8/31/2009 6:18:49 PM
Reply:

Similar Artilces:

Drag/drop from Windows Mail or Outlook Express onto Delphi app and save
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --JivePart=_3d174.zeB8CwDOH5aMJzMl Content-Type: text/plain; charset="Utf-8" See related post in e.p.d.thirdpartytools.general -- Regards, -Steve Faleiro- --JivePart=_3d174.zeB8CwDOH5aMJzMl Content-Type: application/octet-stream; name="oedragdrop.zip" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="oedragdrop.zip" UEsDBBQAAAAIANJ70jxumreApgAAAP8AAAAZAAAAT0VEcmFnRHJvcC9PRUR...

Drag/drop from Windows Mail or Outlook Express onto Delphi app and save message file
Using the component: http://melander.dk/delphi/dragdrop However, while they currently have an example for Outlook, they don't have an example for Windows Mail or Outlook Express. Has anyone got code demonstrating how to save the email message after a drag/drop operation from Windows Mail to a Delphi app using this component? I tried the demos and came close to the answer but I am unable to retrieve the body of the email message. I am posting my code in the attachments group. -- Regards, -Steve Faleiro- ...

Delphi app in Apple App Store for iOS
Have you guys with iPhones and iPads seen that there is a Delphi produced app, running Interbase To Go, approved for download on the Apple App Store? I can't find a link on the web, but search "Embarcadero" on the app store and it shows up. (My daughter showed me. ;-) ) -- Nick > I can't find a link on the web, but search "Embarcadero" on the app > store and it shows up. (My daughter showed me. ;-) ) There are 6 apps that shows up... which one is it? - Palo Alto - Embarcadero (Fom Scott James, mapping software or something..) - Heart of...

Are there any Delphi apps on the iTunes or Mac App Store?
So XE2 has been out for a while now. Surely there must be some apps created with it on either app store (or otherwise). Can someone point me out to those? > {quote:title=Martin Kammann wrote:}{quote} > So XE2 has been out for a while now. Surely there must be some apps created > with it on either app store (or otherwise). > Can someone point me out to those? Anders has one: http://itunes.apple.com/us/app/anders-analog-clock/id475178939?mt=8 And I believe Bob Swart does too. Note that you're not required to use the Mac App Store to deploy your apps to OS X. ...

How do You Write a Web App that Looks like Your Delphi App
Hi I have written an application that I would like to port into a web application. What is the best language to choose. For example php, Ruby on Rails or some other language.. Thank you. > {quote:title=Peter Skinner wrote:}{quote} > Hi > > I have written an application that I would like to port into a web application. What is the best language to choose. > > For example php, Ruby on Rails or some other language.. > > Thank you. Here's something you can try with very little investment of time, which is to auto-convert your existing app's m...

Delphi 7 app to web app conversion [Edit]
My company has an old Windows engineering application that we would like to convert to a web application so that we can offer it as a software as a service. The application is written primarily in Delphi 7 with the heavy number crunching done in Fortran (I did say it was old!). We would like to reuse as much of the existing Delphi code as possible and only modify the Fortran enough so that it will run in the background on the web server. We have never developed a web application so we're looking for guidance on the best way to make this conversion. Our questions at this point: ...

How to Change Tablet App to Phone app in Delphi XE8? [Edit]
Hi, i've created an app more specifically for tablets. So if the screen is smaller than 7 inch not everything fits. I do work with layouts and Align properties so everything gets scaled accordingly to the screen size. I know a few options to make the app useable for phones ass well. But not sure what the best way is. Option1: Create multiple Views for each size screen. Option2: Use ScaledLayout to make everything smaller or bigger. Option3: Use scrollBox. Option4: Edit component sizes in FormCreate after checking screen size. Option5: Devide in more Forms. *So what&...

Delphi app?
Have a look. http://profantasy.com/products/ft_creating.asp What do you think? Delphi app? -- Dennis Landi Allied Data, Inc. http://www.allied-data.com Electron Server http://www.electronserver.com Dennis Landi wrote: > What do you think? Delphi app? Cool! I got a C code from a Danish guy 15 years ago for the calculations - and created an app that created GIF images of fractal planetary maps in Linux. I mostly used it to create random maps to my desktop background(!). Finally someone has wrote a product of the subject (with some extensions:)... The opt...

How to convert an MDI app to a paned app like the Delphi IDE
I have an old app that uses the MDI style. And I would like to modernise it to use multiple docked/paned windows (e.g something like MS Outlook or the Delphi IDE say). Does anyone have any tips about what needs to be done to migrate my current MDI Forms to the new UI concept. (The app is several hundred thousand lines of code, so a rewrite is out of the question...) AndrewFG Andrew Fiddian-Green wrote: > I have an old app that uses the MDI style. And I would like to > modernise it to use multiple docked/paned windows (e.g something like > MS Outlook or the Delphi ...

problem delphi 2010 apps with a delphi 5 pro Pchar
Hallo I build on till now alle tools and programas with delphi 5 pro now i have delphi 2010 want don't want rewite alle my DLL Tools Like The tool i made for making PDF In case of This DLL i can't becose the vcl i use in delphi 5 will not work in delphi 2010 *This call in apps* {code} Function GenratePDF(Settings:Pchar):Boolean; stdcall external 'GUPPDF2.dll'; {code} *In delphi 5 DLL* {code} Function GenratePDF(Settings:Pchar):Boolean; stdcall; {code} if call the function i get a "Access violation" i think that the settings parameter empty is...

XG Mobile App (Delphi XE2/Firemonkey ) now in the app store
My app is finally in the App Store. My thanks go to forum members for the help provided in all the post here. Xavier Dufaure de Citres ----- _*XG Mobile for iPhone, iPad and iPod Touch now in the App Store*_ XG Mobile is the portable version of the acclaimed program "eXtreme Gammon" for PC. You can now have the power and accuracy of eXtreme Gammon in the palm of your hands. In its few years of existence (since 2009) eXtreme gammon has been recognized as the best backgammon program available. This has been confirmed by top players in the world and by independen...

How to build enterprise-grade Delphi app
Hi It would be nice to build enterprise-grade appl with Delphi, but are the options or third party software (like in J2EE) to do this? e.g. 1) there is J2EE middleware for hosting components - developer is not required to handle all the issues that are connected with session handling and different contexts in which the components can be stored (like application, session, request context, etc.). I understand that some of this can be done in DataSnap or in Web Services (can be even PHP, Java or .NET) and Delphi client - but in both cases there are some drawbacks: - for DataSnap - much shou...

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

calling a c++ dll from a delphi vcl app crashes the app upon exit [Edit]
I am using RAD Studio 2010 and I downloaded the latest updates. Since I can't see how I can attach a file to the message, I included in this message the source code for each file: To reproduce this problem follow these steps: Create a project group with two projects, one c++ dll project and one a Delphi VCL forms project. Save all the files in the same folder. 1. Use the wizard to create the c++ dll project, select c++ & Use VCL checkboxes. Make sure Project Options->C++ Linker->Dynamic RTL is set to true. I also added memmgr.lib and sharemem.obj to the project but I bel...

Web resources about - Dragging and dropping a .WAV from Delphi App to other apps - embarcadero.delphi.win32

Frame-dragging - Wikipedia, the free encyclopedia
Frame-dragging is an effect on spacetime , predicted by Einstein 's general theory of relativity , that is due to non-static stationary distributions ...

Toilet Paper Dragging on the App Store on iTunes
Get Toilet Paper Dragging on the App Store. See screenshots and ratings, and read customer reviews.

Whiplash Movie CLIP - Rushing or Dragging (2014) - Miles Teller, JK Simmons Movie HD - YouTube
Subscribe to TRAILERS: http://bit.ly/sxaw6h Subscribe to COMING SOON: http://bit.ly/H2vZUn Subscribe to INDIE TRAILERS: http://goo.gl/iPUuo Like ...

Queensland warned for dragging heels on royal succession changes
The Gillard government is preparing to override Queensland's attempt to change British royal succession laws if the state does not fall into ...

Harper competition review dragging taxis, shopping hours into 21st century
Governments have often been stuck in a time warp when Australian consumers are increasingly embracing new technology.

Australia dragging chain on G20's global tax crackdown
Australia has been accused of delaying global action on tax evasion.

Why Sunni Arab States are dragging their feet
The Gulf states appear to be reluctant to deal with the massive threat in their own backyard.

Debt load is dragging us down, warns Don Argus
CORPORATE heavyweight Don Argus has warned a doubling of gross national debt to $3 trillion could trigger a long period of low growth and declared ...

ATV driver accused of striking, dragging 70-year-old man
An ATV driver faces a list of charges for allegedly hitting a 70-year-old man and dragging him across his property last month.

Liberals accuse MacKay of dragging Canada 'back to the 1950s'
Justice Minister Peter MacKay defended remarks he made in a speech to the Ontario Bar Association last week in which he reportedly said the reason ...

Resources last updated: 2/4/2016 3:50:49 PM