Extending CPictureHolder for loading BMP, JPG, etc. Delaware

This class extends the MFC CPictureHolder class to include better support for enhanced metafiles, access to picture handles, loading from files, and other capabilities.

Local Companies

Smart Button
302.283.0200
300 Creek View Road
Newark, DE
Bestview Llc
(302) 993-7975
3422 Old Capitol Trl
Wilmington, DE
Moody Systems Group Inc
(302) 777-3264
New Castle, DE
Thinkit Partners
(302) 652-0200
Wilmington, DE
Xpress Computer Systems
(302) 697-3112
1246 Peachtree Run
Magnolia, DE
Vel Micro Works Inc
(302) 239-4661
133 Cheltenham Rd
Hockessin, DE
Preferred Sites Inc
(302) 475-0730
2309 Clearview Ave
Wilmington, DE
Softtech Solutions
(302) 633-4894
4550 New Linden Hill Rd
Wilmington, DE
Incite Solutions Inc
(302) 655-8952
5714 Kennett Pike
Wilmington, DE
Computer Aid Inc
(302) 888-5500
Wilmington, DE

provided by: 
Originally published at Internet.com


Environment: VC6 (earlier probably ok too), Win2K/95/98

This class extends the MFC CPictureHolder class to include




Simply include the .h and .cpp into your project and use it as you would CPictureHolder.

You can also use this instead of the CBitmap class (but with code changes, of course).

And remember that CPictureHolder has a Render method to draw pictures, and it support transparency for GIF's etc.

I built this with various versions of VC6. I don't see why it wouldn't work on other recent versions.

NOTE 1: I would usually have made many of these member functions const. However, CPictureHolder doesn't use any consts, and so I would have to have done lots of (potentially unsafe) const casts in my code.

NOTE 2: Chensu says that OldLoadPicture/IPicture has problems with palettes. I haven't looked at his code yet, but if so, I will (with his permission) update this code to include whatever fixes he added to better support palettes

NOTE 3: I haven't included support for icons in here. It would be trivial to add so I'll leave it as an excercise for the reader :-) ...

Read article at Internet.com site

Featured Local Company

Smart Button

302.283.0200
300 Creek View Road
Newark, DE
http://www.smartbutton.com


Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

Topics:
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML