Extending CPictureHolder for loading BMP, JPG, etc. Indiana

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

Bell Industries Technology Solutions Group
317-704-6000
8888 Keystone Xing
Indianapolis, IN
GT Solutions
317-844-3510
250 E 96th St
Indianapolis, IN
Peartree Software Consulting
317-257-2486
600 Holliday Ln
Indianapolis, IN
Professional Solutions
317-255-1944
2040 E 54th St
Indianapolis, IN
Sanyog Computer Solutions
317-579-0746
8650 Malaga DR
Indianapolis, IN
Seven Opals Software LLC
317-569-1810
1537 Sierra Spgs
Indianapolis, IN
Sterling Creek Software
317-567-5060
5881 E 82nd St
Indianapolis, IN
Advanced Solutions Inc
260-432-9695
7030 Pointe Inverness Way
Fort Wayne, IN
Britannia Inc
260-482-6321
1616 Directors Row
Fort Wayne, IN
CBS Computer Repair
260-441-9000
2727 Stardale Dr
Fort Wayne, IN

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

Bell Industries Technology Solutions Group

317-704-6000
8888 Keystone Xing
Indianapolis, IN

Related Articles
- Advanced C++/CLI Indiana
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.
- Applied Microsoft .NET Framework Programming Indiana
- Avoiding Boolean Overload Indiana
- .NET Tip Indiana
- Animated Background Banner Indiana
- Automating Repetitive Tasks in Visual Studio Indiana
- Audio Mixer Control Classes Indiana
- An Active Server Pages Tutorial, Part 2 Indiana
- An Active Server Pages Tutorial, Part 1 Indiana
- Adding Standard Deviation to LINQ Indiana
Regional Articles
- Extending CPictureHolder for loading BMP, JPG, etc. Anderson IN
- Extending CPictureHolder for loading BMP, JPG, etc. Angola IN
- Extending CPictureHolder for loading BMP, JPG, etc. Bedford IN
- Extending CPictureHolder for loading BMP, JPG, etc. Bloomington IN
- Extending CPictureHolder for loading BMP, JPG, etc. Brazil IN
- Extending CPictureHolder for loading BMP, JPG, etc. Brownsburg IN
- Extending CPictureHolder for loading BMP, JPG, etc. Carmel IN
- Extending CPictureHolder for loading BMP, JPG, etc. Chesterton IN
- Extending CPictureHolder for loading BMP, JPG, etc. Columbia City IN
- Extending CPictureHolder for loading BMP, JPG, etc. Columbus IN
- Extending CPictureHolder for loading BMP, JPG, etc. Connersville IN
- Extending CPictureHolder for loading BMP, JPG, etc. Crawfordsville IN
- Extending CPictureHolder for loading BMP, JPG, etc. Crown Point IN
- Extending CPictureHolder for loading BMP, JPG, etc. Dyer IN
- Extending CPictureHolder for loading BMP, JPG, etc. East Chicago IN
- Extending CPictureHolder for loading BMP, JPG, etc. Elkhart IN
- Extending CPictureHolder for loading BMP, JPG, etc. Evansville IN
- Extending CPictureHolder for loading BMP, JPG, etc. Fishers IN
- Extending CPictureHolder for loading BMP, JPG, etc. Fort Wayne IN
- Extending CPictureHolder for loading BMP, JPG, etc. Franklin IN
- Extending CPictureHolder for loading BMP, JPG, etc. Gary IN
- Extending CPictureHolder for loading BMP, JPG, etc. Goshen IN
- Extending CPictureHolder for loading BMP, JPG, etc. Granger IN
- Extending CPictureHolder for loading BMP, JPG, etc. Greenfield IN
- Extending CPictureHolder for loading BMP, JPG, etc. Greenwood IN
- Extending CPictureHolder for loading BMP, JPG, etc. Hammond IN
- Extending CPictureHolder for loading BMP, JPG, etc. Hobart IN
- Extending CPictureHolder for loading BMP, JPG, etc. Huntington IN
- Extending CPictureHolder for loading BMP, JPG, etc. Indianapolis IN
- Extending CPictureHolder for loading BMP, JPG, etc. Jeffersonville IN
- Extending CPictureHolder for loading BMP, JPG, etc. Kendallville IN
- Extending CPictureHolder for loading BMP, JPG, etc. Kokomo IN
- Extending CPictureHolder for loading BMP, JPG, etc. Lafayette IN
- Extending CPictureHolder for loading BMP, JPG, etc. Laporte IN
- Extending CPictureHolder for loading BMP, JPG, etc. Logansport IN
- Extending CPictureHolder for loading BMP, JPG, etc. Marion IN
- Extending CPictureHolder for loading BMP, JPG, etc. Martinsville IN
- Extending CPictureHolder for loading BMP, JPG, etc. Merrillville IN
- Extending CPictureHolder for loading BMP, JPG, etc. Michigan City IN
- Extending CPictureHolder for loading BMP, JPG, etc. Mishawaka IN
- Extending CPictureHolder for loading BMP, JPG, etc. Muncie IN
- Extending CPictureHolder for loading BMP, JPG, etc. Munster IN
- Extending CPictureHolder for loading BMP, JPG, etc. New Albany IN
- Extending CPictureHolder for loading BMP, JPG, etc. New Castle IN
- Extending CPictureHolder for loading BMP, JPG, etc. Newburgh IN
- Extending CPictureHolder for loading BMP, JPG, etc. Noblesville IN
- Extending CPictureHolder for loading BMP, JPG, etc. North Vernon IN
- Extending CPictureHolder for loading BMP, JPG, etc. Peru IN
- Extending CPictureHolder for loading BMP, JPG, etc. Portage IN
- Extending CPictureHolder for loading BMP, JPG, etc. Richmond IN
- Extending CPictureHolder for loading BMP, JPG, etc. Schererville IN
- Extending CPictureHolder for loading BMP, JPG, etc. Seymour IN
- Extending CPictureHolder for loading BMP, JPG, etc. Shelbyville IN
- Extending CPictureHolder for loading BMP, JPG, etc. South Bend IN
- Extending CPictureHolder for loading BMP, JPG, etc. Terre Haute IN
- Extending CPictureHolder for loading BMP, JPG, etc. Valparaiso IN
- Extending CPictureHolder for loading BMP, JPG, etc. Vincennes IN
- Extending CPictureHolder for loading BMP, JPG, etc. Wabash IN
- Extending CPictureHolder for loading BMP, JPG, etc. Warsaw IN
- Extending CPictureHolder for loading BMP, JPG, etc. West Lafayette IN
- Extending CPictureHolder for loading BMP, JPG, etc. Zionsville IN
Related Local Event
Live, Learn, & Intern - XBOX Tournament @ Aptera
Dates: 7/30/2009 - 7/30/2009
Location: Aptera Software, Inc.
Fort Wayne, IN
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