Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image from .res file

Status
Not open for further replies.

marcin12

Programmer
Jul 15, 2003
2
0
0
PL
I want to add an image to my application (Image component). I made a .res file with a bitmap in it but I can't load it into an Image. Please help.
 
you should be able to use LoadImage to access the resouce images.

you need to have
#pragma resouce "filename.res"
at the top of the code (replace filename with the name of your resource file)

Then you can do this (if the bitmap within the resource is named BITMAP1, otherwise, subsitute your bitmap's name)

Image1->Picture->Bitmap->LoadFromResourceName(0, "BITMAP1");

Chi Happens
"When you know and respect your own inner nature, you know where you belong. You also know where you don't belong" - Benjamin Hoff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top