Extending CPictureHolder for loading BMP, JPG, etc. Vermont

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

KGS Software Engineering
(802) 879-7848
Po Box 8286
Essex, VT
Divergent Technology Group Inc
(802) 263-5195
Perkinsville, VT
Computer Concepts Inc
(802) 295-3089
Wrj
White River Junction, VT
West Hill Energy and Computing Inc
(802) 685-4424
Chelsea, VT
Soundshore Technology Group Llc
(802) 457-9235
39 Central St
Woodstock, VT
Divergent Technology Group Inc
(802) 263-9564
Perkinsville, VT
Floating Point Digital
(802) 867-0404
Dorset, VT
New England Industrial Sales Co
(802) 885-1159
Springfield, VT
Open Approach Inc
(802) 453-6646
Bristol, VT
Harley James Computer Consultant
(802) 457-2112
10 Lincoln St
Woodstock, VT

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

KGS Software Engineering

8028797848
Po Box 8286
Essex, VT
http://www.kgsse.com

Related Articles
- Advanced C++/CLI Vermont
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.
- Automating Repetitive Tasks in Visual Studio Vermont
- Animated Background Banner Vermont
- Audio Mixer Control Classes Vermont
- An Active Server Pages Tutorial, Part 2 Vermont
- Adding Standard Deviation to LINQ Vermont
- Avoiding Boolean Overload Vermont
- Applied Microsoft .NET Framework Programming Vermont
- An Active Server Pages Tutorial, Part 1 Vermont
- .NET Tip Vermont
Related Articles
- Advanced C++/CLI Vermont
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.
- Automating Repetitive Tasks in Visual Studio Vermont
- Animated Background Banner Vermont
- Audio Mixer Control Classes Vermont
- An Active Server Pages Tutorial, Part 2 Vermont
- Adding Standard Deviation to LINQ Vermont
- Avoiding Boolean Overload Vermont
- Applied Microsoft .NET Framework Programming Vermont
- An Active Server Pages Tutorial, Part 1 Vermont
- .NET Tip Vermont

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