Extending CPictureHolder for loading BMP, JPG, etc. Port Orchard WA

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

Quardev Laboratories
(206) 547-7771
3411 Thorndyke Ave. W
Seattle, WA
Advanced Clinical Software
206-728-0313
2212 4th Ave
Seattle, WA
IMAGINiT Technologies, Inc.
(206) 682-8032
2101 4th Ave.,
Seattle, WA
FiberCloud, Inc.
(206) 777-9999
2001 6th Ave.
Seattle, WA
Merck Research Laboratories / Rosetta
(206) 802-7000
401 Terry Ave. N.
Seattle, WA
WebOnyx
425-985-8802
900 1st Ave S.
Seattle, WA
Responza
(206) 762-5100
655 S. Orcas St.,
Seattle, WA
Dendreon Corporation
(206) 256-4545
3005 1st Ave.
Seattle, WA
Coolearth Technologies, Inc.
(206) 770-9061
226 S Orcas St.
Seattle, WA
Control Systems PNW, Inc.
(206) 344-5929
900 4th Ave.,
Seattle, WA

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

WebOnyx

425-985-8802
900 1st Ave S.
Seattle, WA
http://www.webonyx.com

Related Local Events
2010 'The Future is Now' Technology Expo
Dates: 1/27/2010 - 1/27/2010
Location: ShoWare Center
Kent, WA
View Details

Leads Group: Wired
Dates: 12/31/2009 - 12/31/2009
Location: Mud Bay Coffee
Olympia, WA
View Details

Leads Group: Wired
Dates: 12/24/2009 - 12/24/2009
Location: Mud Bay Coffee
Olympia, WA
View Details

Leads Group: Wired
Dates: 12/13/2009 - 12/13/2009
Location: Mud Bay Coffee
Olympia, WA
View Details

Leads Group: Wired
Dates: 12/3/2009 - 12/3/2009
Location: Mud Bay Coffee
Olympia, WA
View Details

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