Extending CPictureHolder for loading BMP, JPG, etc. Schofield WI

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

Virtual Systems
(920) 532-0781
3310 Mid Valley Dr
De Pere, WI
Home-Tech
(920) 884-6111
1113 Ashwaubenon St
Green Bay, WI
Syslogic Inc
(262) 780-0380
375 Bishops Way Ste 105
Brookfield, WI
Mj Partners Inc
(262) 553-9696
1433 43rd Ave
Kenosha, WI
Comprompter Inc
(608) 785-7766
1601 Caledonia St Ste E
La Crosse, WI
Zamzow Donald & Lou Ann
(715) 359-5189
2212 Hemlock Ave
Schofield, WI
Glythor Inc
(608) 240-0700
2302 International Ln
Madison, WI
Artesyn Technologies
(608) 831-5500
8310 Excelsior Dr
Madison, WI
Bungeecraft Technologies
(414) 449-9105
4824 W Medford Ave
Milwaukee, WI
Matrix Consulting Group
(414) 228-9707
614 W Brown Deer Rd
Milwaukee, WI

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

KMSpecialties

414-751-4009
7434-3 Halverson Rd
Three Lakes, WI
http://www.KMSpecialties.com

Software Services
consulting
custom application and website development / programming
(ETL)data integration
software configuration
MS Access,Visual Basic, VB, VB.net, VBA, SQL
SQL Server, MySQL
PHP,HTML
Three Lakes,Rhinelander, Eagle River,
Minocqua,Tomahawk,Crandon,Wisconsin


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