Extending CPictureHolder for loading BMP, JPG, etc. Kapolei HI

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

Decisionone
(808) 838-7751
3375 Koapaka St
Honolulu, HI
Hawaii Healthcare Technologies, LLC VersaSuite EMR
808-626-5545
info@hawaiihealthcaretech.com
Honolulu, HI
City and County Offices Human Resources Department
(808) 523-4121
650 S King St
Honolulu, HI
Computer 1 Associates Inc
(808) 524-6700
1188 Bishop St
Honolulu, HI
Laser Barcode Solutions
(808) 591-0031
1314 S King St Suite 424
Honolulu, HI
Retail Solutions Inc
(808) 834-1100
2828 Paa St
Honolulu, HI
Hawaii Healthcare Technologies, LLC
808-626-5545
EMR and PM Software Solutions
Honolulu, HI
Century Computers Inc
(808) 585-0444
500 Ala Moana Blvd
Honolulu, HI
Compusultants Inc
(808) 545-1216
1188 Bishop St
Honolulu, HI
Computer Associates International Inc
(808) 585-0057
1132 Bishop St
Honolulu, HI

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

Retail Solutions Inc

(808) 834-1100
2828 Paa St
Honolulu, HI

Related Local Event
GLOBECOM 2009 - 2009 IEEE Global Telecommunications Conference
Dates: 11/30/2009 - 12/4/2009
Location: Hilton Hawaiian Village
Honolulu, HI
View Details

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