Code Comments
Programming Forum and web based access to our favorite programming groups.All, I am wondering if there is a way of embedding .WAV, or any multimedia files into the Delphi 5 program. I am using the media player tool, however it always wants a file. I would like to compile the sound files into my delphi exe. Any suggestions? Thanks, Rob robert.duchene@rogers.com
Post Follow-up to this messageRobert Duchene wrote: > All, > > I am wondering if there is a way of embedding .WAV, or any multimedia file s > into the Delphi 5 program. > > I am using the media player tool, however it always wants a file. I would > like to compile the sound files into my delphi exe. > > Any suggestions? > > Thanks, > Rob > robert.duchene@rogers.com > > you can use the Playsound Api call and use the resource option to play sound from your resource of the EXE file. you can add the resource as a RAW data type. "RT_RAW" in the Recourse you need to specify the name of the resource which you create, the type which is RT_RAW and the filename path from where it is. at build time of y9our app, it will get compiled into the resource of your app. in your app you need to use the resource functions to find and obtain the handle to it, then pass it to the Playsound function as a resource which it will then simply play it, or you could read it from resource into some fixed memory and still use the Playsound to play it. etc..
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.