Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Ulrich Heinicke
|
Oct 25, 2008 - 1:33 PM
|
Hi, i have a database with some PNG image into and want to you this image as RibbonButton. The class CExtSkinButton can only load PNG file form the resource or a file, but i receive the data from the database into a buffer. So i need a function in CExtSkinButton to load the PNG from the memory. How can i do this? Thanks Ulrich
|
|
Technical Support
|
Oct 27, 2008 - 3:58 AM
|
If you load a PNG from a file on disk or from database into memory buffer, then you can load it from memory buffer into a CExtBitmap object using the CExtSkinBitmap::LoadPNG() method. This means you should use the CExtSkinBitmap class from the ProfSkin library instead of the CExtBitmap class fromProf-UIS. The CExtSkinBitmap class is based on code>CExtBitmap</code> and adds support for PNG images. The CExtSkinBitmap::LoadPNG() method requires a CArchive() object. You should initialize the CMemFile() object on existing memory buffer with PNG file content first. Then you will need to initialize CArchive() object referred to CMemFile() object. Please take a look at how the CMemFile() class is used in Prof-UIS source code, where you can find several ready to use code snippets.
|
|