Extending CPictureHolder for loading BMP, JPG, etc. Alameda CA

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

Speller & Company LLC
415-848-3022
795 Folsom Street
San Francisco, CA
International Business Machines Corporation
(415) 545-2000
425 Market St.
San Francisco, CA
OpCon Technologies, Inc.
(415) 439-5389
50 California St., Ste. 1500
San Francisco, CA
San Francisco Technologies, Inc.
(866) 992-2543
123 10th St.
San Francisco, CA
Tierra Technology
(415) 386-2866
833 Market St., 10th Flr.
San Francisco, CA
ClearKite
(866) 894-8090
355 Berry St., Ste. 240
San Francisco, CA
Propertyware
(415) 455-2400
575 Market St., Ste. 375
San Francisco, CA
Mindjet Corporation
(415) 229-4200
1160 Battery St., 4th Flr
San Francisco, CA
Microsoft Corporation
(415) 972-6400
835 Market St., Ste. 700
San Francisco, CA
Streetline Networks
(650) 714-5528
995 Market St., 16th Flr.
San Francisco, CA

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

ClearKite

(866) 894-8090
355 Berry St., Ste. 240
San Francisco, CA

Related Local Events
Contraceptive Technology Conference : San Francisco
Dates: 3/24/2010 - 3/27/2010
Location: Hyatt Regency Hotel
San Francisco, CA
View Details

Advanced Lithography
Dates: 2/21/2010 - 2/26/2010
Location: San Jose Convention Center
San Jose, CA
View Details

Informex USA
Dates: 2/16/2010 - 2/19/2010
Location: Moscone Convention Center, San Francisco
San Francisco, CA
View Details

MACWORLD 2010
Dates: 1/4/2010 - 1/8/2010
Location: Moscone Convention Center
San Francisco, CA
View Details

Web 2.0 Summit
Dates: 10/20/2009 - 10/22/2009
Location: Westin San Francisco Market Street
San Francisco, CA
View Details

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