Extending CPictureHolder for loading BMP, JPG, etc. Lawrence KS

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

K & L Technology Consulting Llc
(785) 856-2626
601 Durham Ct
Lawrence, KS
Zaffaroni Gregg
(913) 362-8888
Kansas City, KS
Advanced Computer Associates Inc
(913) 906-9744
10800 Farley St
Overland Park, KS
Accurlt Systems
(913) 451-6777
9393 W 110th St Ste 500
Overland Park, KS
Allison Data
(316) 636-9095
3031 W Pawnee St Ste 500
Wichita, KS
Sanders Software Consulting
(785) 865-5111
Lawrence, KS
On Point
(913) 236-7787
6701 W 64th St
Kansas City, KS
First Student Inc
(913) 294-5449
1010 N Pearl St
Paola, KS
Data Systems International
(913) 696-4000
7801 W 110th St
Shawnee Msn, KS
Opus Northwest Llc
(913) 390-7805
1671 E Kansas City Rd
Olathe, KS

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

Mersoft Corporation

913-871-6196
9300 W. 110th Street
Overland Park, KS
http://www.mersoft.com

Related Local Events
Girls in Science, Technology, Engineering and Mathematics: Exploring Opportunities and Opening Doors
Dates: 10/6/2009 - 10/6/2009
Location: Metropolitan Community College
Kansas City, MO
View Details

BarCampKC
Dates: 9/26/2009 - 9/26/2009
Location: JavaportKC
Kansas City, MO
View Details

Brain Food-Discover the 21st Century Virtual Office
Dates: 9/16/2009 - 9/16/2009
Location: World Trade Center Room
Kansas City, MO
View Details

Brain Food-Discover the 21st Century Virtual Office
Dates: 9/16/2009 - 9/16/2009
Location: World Trade Center Room
Kansas City, MO
View Details

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