Extending CPictureHolder for loading BMP, JPG, etc. New Hampshire

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

QED Connect
(603)881-3884
2 Townsend West Unit 1
Nashua, NH
Rockport Technology Group Inc
(603) 432-4613
8 Industrial Way
Salem, NH
Avantek Services
(603) 742-1333
44 Dover Point Rd
Dover, NH
Kdj Assocs Inc
(603) 882-3643
45 Northwood Dr
Nashua, NH
Ai Automatiks Inc
(603) 332-2055
194 Milton Rd
Rochester, NH
Pennock Hill Consulting Llc
(603) 448-0483
7 Bank St
Lebanon, NH
Software Pundits Inc
(603) 598-8700
Nashua, NH
Foster A
(603) 659-4555
11 Spencer Ln
Lee, NH
Gran-Net Innovative Technologies Group
(603) 890-0535
14 Stiles Rd Ste 101
Salem, NH
Rockport Technology Group Inc
(603) 681-0333
18 Keewaydin Dr
Salem, NH

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

QED Connect

SaaS provider for the mobile work force

(603)881-3884
2 Townsend West Unit 1
Nashua, NH
www.qedconnect.com

QED Connect, Inc. is an information security Software-as-a-Service (SaaS) provider that gives organizations visibility, management and control of activity on all their computers, laptops and wireless devices. The company’s popular SaaS, Omni Manager, is an affordable way to monitor and manage how employees are using company computers and the Internet at any time, from any location in the world. This solves the problems created by today’s ‘virtual’ work environment of branch offices, remote workers and traveling employees. Omni Manager is a web-hosted software application that includes e-mail and Internet filtering and blocking, antivirus, instant messaging management, asset tracking, application usage monitoring and policy management. ROI is delivered by employee productivity gains, cost savings and improved operational efficiencies.

Related Articles
- Advanced C++/CLI New Hampshire
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.
- An Active Server Pages Tutorial, Part 1 New Hampshire
- Avoiding Boolean Overload New Hampshire
- Applied Microsoft .NET Framework Programming New Hampshire
- Audio Mixer Control Classes New Hampshire
- Automating Repetitive Tasks in Visual Studio New Hampshire
- .NET Tip New Hampshire
- Animated Background Banner New Hampshire
- Adding Standard Deviation to LINQ New Hampshire
- An Active Server Pages Tutorial, Part 2 New Hampshire
Related Local Events
Thin Film & Crystal Growth Mechanisms 2009
Dates: 7/12/2009 - 7/17/2009
Location: Colby Sawyer College
New London, NH
View Details

Physical Organic Chemistry 2009
Dates: 6/28/2009 - 7/3/2009
Location: Holderness School
Plymouth, NH
View Details

Atomic Physics 2009
Dates: 6/28/2009 - 7/3/2009
Location: Tilton School
Tilton, NH
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