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 |
|
Offer Har
|
Oct 16, 2006 - 10:44 AM
|
Hi,
I need to display a bitmap and not an icon on the button - I could not find any support for this in the class’s interface. How can this be done?
Thanks.
|
|
Technical Support
|
Oct 17, 2006 - 4:05 AM
|
You can use the CExtBitmap class to load a bitmap from a file or a resource and then generate an icon from it. Here are the steps to achieve this:
1) Load a bitmap using CExtBitmap::LoadBMP_File() or CExtBitmap::LoadBMP_Resource() ; 2) Make it 32-bit compatible using CExtBitmap::Make32() ; 3) Use CExtBitmap::AlphaColor() method to make all pixels of a particular color transparent; 4) Generate an HICON handle from this bitmap using CExtBitmap::CreateHICON() ; 5) To assign the icon to a button (the CExtButton class), use the CExtButton::SetIcon() method.
|
|
Offer Har
|
Oct 17, 2006 - 3:36 PM
|
Thanks,
That solved the problem.
Where can i find documentation of the AlphaColor function? what are the parameters?
|
|
Technical Support
|
Oct 18, 2006 - 7:19 AM
|
This method sets the alpha channel value for all pixels of the specified color. You can find the description of this method in the Prof-UIS 2.60 Help.
|
|