Board index » delphi » Using Resource files to store bitmaps

Using Resource files to store bitmaps

I am trying to use resource files to store bitmaps rather than storing
them as separate files. All of the books Ihave come across seem to think
this is so trivial that they only mention it in passing. I have tried
using LoadResourceName and Load Bitmap but I have had no luck and am not
really sure about the parameters I am passing.
Can anybody help?
Yours in hope
Graham Meaden

 

Re:Using Resource files to store bitmaps


On Mon, 4 Aug 1997 15:49:17 GMT, John Day <j.c.c....@bris.ac.uk>
wrote:

Quote
>I am trying to use resource files to store bitmaps rather than storing
>them as separate files. All of the books Ihave come across seem to think
>this is so trivial that they only mention it in passing. I have tried
>using LoadResourceName and Load Bitmap but I have had no luck and am not
>really sure about the parameters I am passing.
>Can anybody help?
>Yours in hope
>Graham Meaden

When these sources mention using "resource files", they most likely
were referring to resource only DLLs; is that how you're creating
yours?

Stephen Posey
slpo...@concentric.net

Re:Using Resource files to store bitmaps


Quote
Stephen Posey wrote:
> On Mon, 4 Aug 1997 15:49:17 GMT, John Day <j.c.c....@bris.ac.uk>
> wrote:

> >I am trying to use resource files to store bitmaps rather than
> storing
> >them as separate files. All of the books Ihave come across seem to
> think
> >this is so trivial that they only mention it in passing. I have tried

> >using LoadResourceName and Load Bitmap but I have had no luck and am
> not
> >really sure about the parameters I am passing.

> When these sources mention using "resource files", they most likely
> were referring to resource only DLLs; is that how you're creating
> yours?

var
  BMP                                   : TBitmap;
begin
  BMP := TBitmap.Create;
  BMP.Handle := LoadBitmap(HInstance, 'MyBitmap');
  Form1.Canvas.Draw(0, 0, BMP);
  Bmp.Free;

--
Jason Wallace
SL Software
Dark...@SLSoftware.reno.nv.us
--
"We are MicroSoft.  You will be assimilated.  Resistance is Futile."
--

Other Threads