Extending CPictureHolder for loading BMP, JPG, etc. Warwick RI

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

Nesoft Corp
(401) 738-8081
2699 Post Rd Ste B
Warwick, RI
Fanion McDonagh & Co Llc
(401) 384-6263
2374 Post Rd Ste 1
Warwick, RI
Internal Matters
(401) 738-2882
334 Knight St
Warwick, RI
Internal Matters
(401) 739-3686
334 Knight St
Warwick, RI
Comhighway Llc
(401) 463-9554
68 Damon Ave
Warwick, RI
Komputer Klinic the
(401) 921-4888
2845 Post Rd
Warwick, RI
Application Design Services Llc
(401) 737-2040
250 Centerville Rd
Warwick, RI
Riccitelli L J & Assoc
(401) 737-5055
111 Ambassador Ave
Warwick, RI
Comhighway Llc
(401) 921-2300
68 Damon Ave
Warwick, RI
Champion Systems Corporation
(401) 885-7828
5 Division
Warwick, RI

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

Coronella Associates, Inc.

(508) 376-8872
2 Milliston Road, Suite 1D
Millis, MA

Related Local Events
EMBEDDED SYSTEMS CONFERENCE - BOSTON 2009
Dates: 9/21/2009 - 9/24/2009
Location: Hynes Convention Center
Boston, MA
View Details

Software Development Best Practices 2009
Dates: 9/21/2009 - 9/24/2009
Location: Hynes Convention Center
Boston, MA
View Details

September Networking Breakfast
Dates: 9/15/2009 - 9/15/2009
Location: Holiday Inn Boston - Somerville
Somerville, MA
View Details

September Networking Breakfast
Dates: 9/15/2009 - 9/15/2009
Location: Holiday Inn Boston - Somerville
Somerville, MA
View Details

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