Extending CPictureHolder for loading BMP, JPG, etc. Ft Mitchell KY

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

3D Computer Systems
513-569-0500
2230 Auburn Ave
Cincinnati, OH
21st Century Designs Inc.
(513) 662-5862
P.O. Box 112091
Cincinnati, OH
A-Hi Computers & Electronics
(513) 531-1111
4030 Montgomery Road
Cincinnati, OH
Graphic Informatn Systems Inc
513-948-1300
7633 Production Dr
Cincinnati, OH
Chemical Systems International Inc.
(513) 385-6688
3567 Blue Rock Road
Cincinnati, OH
Netburg Consulting Services
513-247-9701
150 E 4th Street
Cincinnati, OH
Software Systems Consulting Inc.
(859) 689-4333
3500 Langley Drive
Hebron, KY
The Shepherd Chemical Co.
(513) 731-1110
4900 Beech Street
Norwood, OH
Armadillo Technologies, LLC
513-368-7809
7281 Brixton Lane
Cincinnati, OH
Cincinnati PC Solutions
513-871-3600
4770 Redbank Expressway
Cincinnati, OH

 

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

Netburg Consulting Services

513-247-9701
150 E 4th Street
Cincinnati, OH
http://www.netburg.com

Related Local Event
Forge Fair 2010
Dates: 4/20/2010 - 4/22/2010
Location: Cincinnati Convention Center
Cincinnati, OH
View Details

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