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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bitmaps & Imagelist - file or embedded

Status
Not open for further replies.

richsb

Technical User
Aug 2, 2001
34
NO
Hi,

My application involves a user wanting to view a set of images, one at a time, depending on which image was selected via a mouse click. Would it be best to embed the images in the exe file or do I enable them to be loaded from a data file? There will be a number of different sets of images which will be produced as time passes, hence the idea of being able to load new image sets at a later date.

If I choose the file loading method, how could I protect the images (BMPs) from being viewed by other means, ie. explorer or paintshoppro etc. as I only want the images to be viewed via my application?

If I choose to embed the images in the exe file, would it be better to have them as a separate bmp resource or would it be better to save each different set of images as a CImagelist ?
Further to this, I have already tried loading an ImageList into a CStatic picture control but to no avail, if this is the better way to store the images, how can I get around the problem of different handle types for the picture control and the image list?

Thanks for your thoughts
Rich
 
Why don't you embed them in a seperate resource dll and load them from there, instead of from plain files on disk?

You can replace the resource dll when you need to load a different set of images and it won't be very obvious to users that the dll contains bitmaps, besides the fact that explorer and paintshop pro don't support loading images like this (well, actually; paintshop pro i don;t know about, but it seems highly unlikely, doesn't it?)

Greetings,
Rick
 
Thanks LazyMe, that's gave me a whole new outlook on life...... well at least as far as my coding goes!

Rich

[bigglasses]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top