CMFCToolBarImages Class
The images on a toolbar. The CMFCToolBarImages class manages toolbar images loaded from application resources or from files.
class CMFCToolBarImages : public CObject
Members
Public Constructors
Name |
Description |
---|---|
Constructs a CMFCToolBarImages object. |
Public Methods
Name |
Description |
---|---|
|
|
Adds an icon to the toolbar images. |
|
Adds a bitmap to the toolbar images. |
|
|
|
Frees the system resources that were allocated to this object. |
|
Converts underlined bitmaps to 32 bpp images. |
|
|
|
|
|
Initializes the toolbar images from an image list (CImageList Class). |
|
|
|
Deletes the image that has a specified index from the toolbar images if this set of toolbar images contains user-defined images. |
|
Draws a single toolbar image (button). |
|
|
|
|
|
Frees system resources after a toolbar image is drawn. |
|
Returns the icon that has a specified image index from the toolbar images. |
|
Fills a rectangle by using a brush that has the toolbar background colors. |
|
|
|
Returns current resolution of underlined images. |
|
Returns the number of images on the toolbar. |
|
Returns the alpha channel value that is used for disabled images. |
|
|
|
Retrieves either the size of the toolbar images that are stored in memory (source size), or the size of the toolbar images that are drawn on the screen (destination size). |
|
Returns the handle to the bitmap that contains all the toolbar images. |
|
|
|
|
|
|
|
|
|
|
|
Returns the image index for a specified resource ID. |
|
Returns current scale ratio of underlined images. |
|
|
|
Grays the toolbar images to make them look disabled. |
|
Determines whether the operating system supports 32-bit alpha blending. |
|
|
|
Determines whether right-to-left (RTL) support is enabled. |
|
Determines whether the toolbar images are read-only. |
|
Tells whether the underlined images are scaled or not. |
|
Determines whether this set of toolbar images contains user-defined images. |
|
Determines whether this set of toolbar images contains a valid toolbar image. |
|
Loads toolbar images from system resources or from a file. |
|
|
|
|
|
|
|
|
|
|
|
Horizontally mirrors all of the toolbar images. |
|
Horizontally mirrors a bitmap. |
|
|
|
|
|
|
|
Allocates the resources that are required to draw a toolbar image at a specified size. |
|
Stores the toolbar images in a file if this set of toolbar images contains user-defined images. |
|
|
|
Sets the alpha channel value that is used for disabled images. |
|
|
|
Sets the size of a toolbar image (source size). |
|
|
|
|
|
|
|
|
|
Sets the transparent color of the toolbar images. |
|
Smoothly resizes underlined images. |
|
Updates a user-defined toolbar image from a bitmap. |
Protected Methods
Name |
Description |
---|---|
|
Data Members
Name |
Description |
---|---|
TRUE if truecolor alpha blending (32-bit color) is disabled. |
Remarks
The full bitmap of toolbar images managed by CMFCToolbarImages consists of one or more small toolbar images (buttons) of a fixed size.
Example
The following example demonstrates how to configure a CMFCToolBarImages object by using various methods in the CMFCToolBarImages class. The example shows how to set the size of the toolbar image, load an image, and set the transparent color of the image. This code snippet is part of the Visual Studio Demo sample.
CMFCToolBarImages m_Image;
...
m_Image.SetImageSize (CSize (32, 32));
m_Image.Load(IDR_START);
m_Image.SetTransparentColor(RGB(255, 0, 255));
Inheritance Hierarchy
Requirements
Header: afxtoolbarimages.h