Extending CPictureHolder for loading BMP, JPG, etc. Colorado

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

Database Link LLC
303 269 1801
7125 E.Townsend Dr.
Denver, CO
Database Link LLC
303 269 1801
7125 E.Townsend Dr.
Denver, CO
21st Century Technologies, Inc.
303-744-2178
1566 S. Pennsylvania St.
Denver, CO
Rapid Refill Ink
303-292-9465
1719 Wazee St
Denver, CO
International Computer Services
720-859-0404
10 S Havana St
Aurora, CO
The Logix Group
(720) 259-7500
8801 E. Hampden Ave.
Denver, CO
EDUSS Education Software
303-779-8700
8000 E Belleview
Greenwood Village, CO
Amadeus Consulting
720 564 1231
1995 N. 57th Ct.
Boulder, CO
C Graphics
720-890-2911
8547 E. Arapahoe Rd.
Greenwood Village, CO
DENVER DATAMAN
303731-5978
1685 S. Colorado Blvd
Denver, CO

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

Database Link LLC

303 269 1801
7125 E.Townsend Dr.
Denver, CO
http://www.dblink.co.nz

Related Articles
- Advanced C++/CLI Colorado
C++/CLI has a number of advanced features that make developing and maintaining applications easier. Discover how these allow types to be moved between assemblies without breaking existing application, allow fast and efficient interoperability between native functions, and make it possible to create functions that take a variable number of parameters while still maintaining type safety.
- Avoiding Boolean Overload Colorado
- Audio Mixer Control Classes Colorado
- Applied Microsoft .NET Framework Programming Colorado
- .NET Tip Colorado
- Adding Standard Deviation to LINQ Colorado
- Animated Background Banner Colorado
- Automating Repetitive Tasks in Visual Studio Colorado
- An Active Server Pages Tutorial, Part 1 Colorado
- An Active Server Pages Tutorial, Part 2 Colorado
Regional Articles
- Extending CPictureHolder for loading BMP, JPG, etc. Arvada CO
- Extending CPictureHolder for loading BMP, JPG, etc. Aurora CO
- Extending CPictureHolder for loading BMP, JPG, etc. Boulder CO
- Extending CPictureHolder for loading BMP, JPG, etc. Brighton CO
- Extending CPictureHolder for loading BMP, JPG, etc. Broomfield CO
- Extending CPictureHolder for loading BMP, JPG, etc. Canon City CO
- Extending CPictureHolder for loading BMP, JPG, etc. Castle Rock CO
- Extending CPictureHolder for loading BMP, JPG, etc. Colorado Springs CO
- Extending CPictureHolder for loading BMP, JPG, etc. Commerce City CO
- Extending CPictureHolder for loading BMP, JPG, etc. Denver CO
- Extending CPictureHolder for loading BMP, JPG, etc. Durango CO
- Extending CPictureHolder for loading BMP, JPG, etc. Englewood CO
- Extending CPictureHolder for loading BMP, JPG, etc. Evergreen CO
- Extending CPictureHolder for loading BMP, JPG, etc. Fort Collins CO
- Extending CPictureHolder for loading BMP, JPG, etc. Fort Morgan CO
- Extending CPictureHolder for loading BMP, JPG, etc. Fountain CO
- Extending CPictureHolder for loading BMP, JPG, etc. Golden CO
- Extending CPictureHolder for loading BMP, JPG, etc. Grand Junction CO
- Extending CPictureHolder for loading BMP, JPG, etc. Greeley CO
- Extending CPictureHolder for loading BMP, JPG, etc. Lafayette CO
- Extending CPictureHolder for loading BMP, JPG, etc. Littleton CO
- Extending CPictureHolder for loading BMP, JPG, etc. Longmont CO
- Extending CPictureHolder for loading BMP, JPG, etc. Loveland CO
- Extending CPictureHolder for loading BMP, JPG, etc. Montrose CO
- Extending CPictureHolder for loading BMP, JPG, etc. Morrison CO
- Extending CPictureHolder for loading BMP, JPG, etc. Parker CO
- Extending CPictureHolder for loading BMP, JPG, etc. Pueblo CO
- Extending CPictureHolder for loading BMP, JPG, etc. Sterling CO
- Extending CPictureHolder for loading BMP, JPG, etc. Westminster CO
- Extending CPictureHolder for loading BMP, JPG, etc. Wheat Ridge CO
Related Articles
- Advanced C++/CLI Colorado
C++/CLI has a number of advanced features that make developing and maintaining applications easier. Discover how these allow types to be moved between assemblies without breaking existing application, allow fast and efficient interoperability between native functions, and make it possible to create functions that take a variable number of parameters while still maintaining type safety.
- Avoiding Boolean Overload Colorado
- Audio Mixer Control Classes Colorado
- Applied Microsoft .NET Framework Programming Colorado
- .NET Tip Colorado
- Adding Standard Deviation to LINQ Colorado
- Animated Background Banner Colorado
- Automating Repetitive Tasks in Visual Studio Colorado
- An Active Server Pages Tutorial, Part 1 Colorado
- An Active Server Pages Tutorial, Part 2 Colorado
Related Local Events
SEG - Society of Exploration Geophysicists Annual International Meeting and Exposition 2010
Dates: 10/17/2010 - 10/21/2010
Location: Denver Convention Center
Denver, CO
View Details

INTC 2009
Dates: 9/21/2009 - 9/24/2009
Location: Hyatt Convention Center Hotel
Denver, CO
View Details

RetailVision Fall 2009
Dates: 8/30/2009 - 9/3/2009
Location: Hyatt Regency Denver
Denver, CO
View Details

SANS Rocky Mountain 2009
Dates: 7/7/2009 - 7/13/2009
Location: Grand Hyatt Denver
Denver, CO
View Details

15th International Conference on Solid-State Sensors, Actuators and Microsystems (Transducers 2009)
Dates: 6/21/2009 - 6/25/2009
Location: Sheraton Denver Downtown Hotel
Denver, CO
View Details

Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

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