Loading an image in from a resource file
I'm using MSVC++ 2003 and am creating a windows forms application.
I want to load in an image from a resource file during runtime so that it can be used by a picturebox. It is fine if the image is added to the resources before compile/runtime.
I have absolutely no idea about resources. What I have tried though (successfully) is to add an image to my app.rc file. It then comes up in my resource view as IDB_BITMAP000 or something like that. How can I then use this in my program code to actually for example set the image of a picturebox to that image???
I don't think it's relevant, but the image(s) I am trying to load in are all bitmaps.
OR, is there a better way to do what I am trying to do other than using resources? Perhaps a different resource file type (not .rc but .resX or something like that...)??
As i said I have no idea and haven't programmed anything yet so I am open to all ideas!!
A second question:
How can I make it so that white JUST ON THAT IMAGE is treated as transparent. I tried setting the transparent colour on the picturebox object to white, but it didn't seem to work. Perhaps a stupid error on my part??