Extending CPictureHolder for loading BMP, JPG, etc. Alaska

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

Surveyors Exchange Co
800-770-5500
3695 Springer St
Anchorage, AK
Accoladde
+91 9962299053
2033 Gateway place
San Jose, AK
Taskklock
907-677-8963
1115 Whitney RD
Anchorage, AK
SDAC Inc. [Strategic Data Alliance Consulting, Inc.]
407-367-9510
583 Caledonia Place
Sanford, AK
Communications Software Inc
907-279-7800
1505 W 32nd Ave
Anchorage, AK
Ctg
907-261-6500
4701 Business Park Blvd
Anchorage, AK
GFI Software
919-379-3361
15300 Weston Parkway
Cary, AK
PKWARE, Inc.
414-289-9788 ext 117
648 N Plankinton Ave
Milwaukee, AK
Alaska Computer Brokers
907-267-4200
551 W Dimond Blvd
Anchorage, AK
Apex Logic
907-274-6696
1343 G St
Anchorage, AK

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

Surveyors Exchange Co

800-770-5500
3695 Springer St
Anchorage, AK
http://www.tse-ak.com


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