Extending CPictureHolder for loading BMP, JPG, etc. Hood River OR

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

Embarq
1-800-877-1125
902 Wasco
Hood River, OR
Advanced Navigation & Positioning Corp
(541) 386-1747
11 3rd St
Hood River, OR
Integrated Network Consultants Corp
(503) 366-1840
1371 Cowlitz St
Saint Helens, OR
Paragon Software
(541) 683-3470
2149 Centennial Pz
Eugene, OR
Bednar Larry F Statistician
(503) 493-8542
3226 NE 24th Ave
Portland, OR
Gorge Networks
541-386-8300
616 Industrial Way
Hood River, OR
Advanced Systems Concepts Inc
(541) 386-2225
514 State St
Hood River, OR
Solution Engineering Inc
(541) 386-9433
1217 May St
Hood River, OR
Beaver Computers
(503) 628-1556
PO Box 1913
Beaverton, OR
Aegis Technical Services of Oregon
(503) 641-0486
4815 SW MacAdam Ave
Portland, OR

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

Gorge Networks

541-386-8300
616 Industrial Way
Hood River, OR
http://new.gorge.net/


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