Resource file creation

Resource file creation

Post by Azre » Fri, 05 Feb 1999 04:00:00



Hi Scott!
You can use a command line compiler to do that! "brcc32.exe"
found in your Delphi/Bin directory.

1: Create a text file any, (you can use notepad.exe).
 typy in the recource ID's and types
 for example: {test.txt}

MONEY_SOUND_CALENDAR   WAVE "moneycalendar.wav"
MONEY_SOUND_TABCONTROL WAVE "moneytabcontrol.wav"

2:Then all you need to do is run the brcc32.exe passing the test.txt as a
parameter.
{I usually create a shortcut to brcc32.exe and drag and drop the script file
over it.}
the compiler will generate "test.res" file wich you can include in your
project
{$R test.res}

Then to play the sound you can use already declared functions in
MMSystem.pas

for example:

uses MMSystem;
.................................
const
 MySound1Const = 'MONEY_SOUND_CALENDAR';
begin
PlaySound(PChar(MySound1Const),hInstance,SND_RESOURCE or SNDASYNC or
SND_NODEFAULT);
end;

Hope this helps.
Azret.

 
 
 

Resource file creation

Post by Scott Ritte » Sat, 06 Feb 1999 04:00:00


I haven't as yet created myself a resource file.  I now want to put a .WAV
file into a resource file.  What can I use to create the resource file ?
The ImageEditor only allows images (obviously as the name implies) to be put
into a resource.  There has to be a way to put wave files in too.

Could someone please help me find the way ?

Thank-you in advance.

Scott Ritter

 
 
 

Resource file creation

Post by Davie Ree » Sat, 06 Feb 1999 04:00:00


I think there was a program called RESOURCE WORKSHOP that came with Delphi 1.0.
I bought Delphi 1.0 a few years ago and found it so buggy, I just dumped it. I
will say this, the Resource Workshop was a pretty good program though and you
CAN DO what you want to with it. It allowed you to add FONTS & menus &
stringlists etc...I'm not sure how & if you can get it.
Davie

> I haven't as yet created myself a resource file.  I now want to put a .WAV
> file into a resource file.  What can I use to create the resource file ?
> The ImageEditor only allows images (obviously as the name implies) to be put
> into a resource.  There has to be a way to put wave files in too.

> Could someone please help me find the way ?

> Thank-you in advance.

> Scott Ritter

 
 
 

Resource file creation

Post by Joe C. Hech » Sat, 06 Feb 1999 04:00:00


Check the developer support area of the Inprise/Borland
web site for TI's.

Look for the one "How to make your Delphi App Sing"....

Joe


> I haven't as yet created myself a resource file.  I now want to put a .WAV
> file into a resource file.  What can I use to create the resource file ?
> The ImageEditor only allows images (obviously as the name implies) to be put
> into a resource.  There has to be a way to put wave files in too.

> Could someone please help me find the way ?

> Thank-you in advance.

> Scott Ritter

--
Joe C. Hecht
http://home1.gte.net/joehecht/index.htm