Board index » cppbuilder » Put a 256 color icon into a resource file (.res)

Put a 256 color icon into a resource file (.res)

Quote
>>How can I put a 256 color icon into a resource file (.res)? I try to use

image editor but it only creates 16color (max) icons. Is there anything
I can put into the .rc file to add it (like I do with bitmaps)?

You can create a BMP file with MS Paint and then add it to a resource script
(RC) file like this:

BITMAP BM1 "myimage.bmp"

That's the entire RC file (just create a new text file and save it with an
RC extension). Now add the RC file to the project and compile. The bitmap
can now be loaded with

LoadFromResourceName((int)HInstance, "BM1");

Also from "Teach Yourself BCB 3 in 21 Days." ;)

--
Kent (TeamB and TurboPower Software)

 

Re:Put a 256 color icon into a resource file (.res)


How can I put a 256 color icon into a resource file (.res)? I try to use
image editor but it only creates 16color (max) icons. Is there anything
I can put into the .rc file to add it (like I do with bitmaps)? Thanks.

Other Threads