Many thanks for your replies Al and Andrew. Another quick question whilst I have your 
attention :-).

How can I add a Jpeg/wav to a resource file?? The Image Editor tool only accomodates 
icons, bmps, and cursors. Is there another tool which you are using??

> -----Original Message-----
> From: MIME :[EMAIL PROTECTED] > Sent: Thursday, 12 August 1999 12:21
> To: [EMAIL PROTECTED]
> Subject: RE: [DUG]: Resource Files
> > > There is some other constraints too which are needed in the > res file. I will
> give you mine here as an example:
> > ;filename whatever.rc
> click wave preload fixed pure "Utopia Close.wav"
> ;note the above type for wave file
> opro wave preload fixed pure "openpro.wav"
> CReg wave preload fixed pure "ShareMsg.wav"
> Novideo ICON Novideo.ico
> ;note the above type for icon file
> Video ICON Video.ico
> alpic bitmap "al.bmp"
> ;note the above type for picture file, type jpg
> > Now follows an example of how to get all of this into your > soft - excuse the
> code; it is cut and paste out of myapp:
> > procedure TCamForm.FormCreate(Sender: TObject);
> var
>   h: Thandle;
>   ClickS, ClickB, opro, handsome: pointer;
> begin
>   h := FindResource(hInstance, pchar('CLICK'), 'WAVE');
>   h := LoadResource(hInstance, h);
>   clickS := LockResource(h);
>   h := FindResource(hInstance, pchar('opro'), 'WAVE');
>   h := LoadResource(hInstance, h);
>   opro := LockResource(h);
>   h := FindResource(hInstance, pchar('Creg'), 'WAVE');
>   h := LoadResource(hInstance, h);
>   creg := LockResource(h);
>   h:= FindResource(hInstance, pchar('alpic'), 'RT_BITMAP');
>   h := LoadResource(hInstance, h);
>   handsome:= LockResource(h);
> // here follows eg how to use:
>    sndPlaySound(clickS, SND_MEMORY or SND_ASYNC); //gotta do > a dinky sound
> > Now depending on your use of 'handsome' you may need to > preface it with a
> bitmap file info header. Personally, I dont like using > bitmaps as they will
> take up a fairly large chunk of filesize. Much more efficient > is to include
> JPEG resource as file and load that.
> Why I say this, is I have been down the same track and doing > it the latter
> way is better.
> Or to make it easy and allow bitmap compression (the > installation program)
> you could use the bitmaps externally and bitmap.loadfromfile.
> > > --------------------------------------------------------------
> -------------
>     New Zealand Delphi Users group - Delphi List - > [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> > > 


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to