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

CMFCToolBarImages::CMFCToolBarImages

Constructs a CMFCToolBarImages object.

Public Methods

Name

Description

CMFCToolBarImages::AdaptColors

 

CMFCToolBarImages::AddIcon

Adds an icon to the toolbar images.

CMFCToolBarImages::AddImage

Adds a bitmap to the toolbar images.

CMFCToolBarImages::CleanUp

 

CMFCToolBarImages::Clear

Frees the system resources that were allocated to this object.

CMFCToolBarImages::ConvertTo32Bits

Converts underlined bitmaps to 32 bpp images.

CMFCToolBarImages::CopyImageToClipboard

 

CMFCToolBarImages::CopyTo

 

CMFCToolBarImages::CreateFromImageList

Initializes the toolbar images from an image list (CImageList Class).

CMFCToolBarImages::CreateRegionFromImage

 

CMFCToolBarImages::DeleteImage

Deletes the image that has a specified index from the toolbar images if this set of toolbar images contains user-defined images.

CMFCToolBarImages::Draw

Draws a single toolbar image (button).

CMFCToolBarImages::DrawEx

 

CMFCToolBarImages::EnableRTL

 

CMFCToolBarImages::EndDrawImage

Frees system resources after a toolbar image is drawn.

CMFCToolBarImages::ExtractIcon

Returns the icon that has a specified image index from the toolbar images.

CMFCToolBarImages::FillDitheredRect

Fills a rectangle by using a brush that has the toolbar background colors.

CMFCToolBarImages::GetAlwaysLight

 

CMFCToolBarImages::GetBitsPerPixel

Returns current resolution of underlined images.

CMFCToolBarImages::GetCount

Returns the number of images on the toolbar.

CMFCToolBarImages::GetDisabledImageAlpha

Returns the alpha channel value that is used for disabled images.

CMFCToolBarImages::GetFadedImageAlpha

 

CMFCToolBarImages::GetImageSize

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).

CMFCToolBarImages::GetImageWell

Returns the handle to the bitmap that contains all the toolbar images.

CMFCToolBarImages::GetImageWellLight

 

CMFCToolBarImages::GetLastImageRect

 

CMFCToolBarImages::GetLightPercentage

 

CMFCToolBarImages::GetMapTo3DColors

 

CMFCToolBarImages::GetMask

 

CMFCToolBarImages::GetResourceOffset

Returns the image index for a specified resource ID.

CMFCToolBarImages::GetScale

Returns current scale ratio of underlined images.

CMFCToolBarImages::GetTransparentColor

 

CMFCToolBarImages::GrayImages

Grays the toolbar images to make them look disabled.

CMFCToolBarImages::Is32BitTransparencySupported

Determines whether the operating system supports 32-bit alpha blending.

CMFCToolBarImages::IsPreMultiplyAutoCheck

 

CMFCToolBarImages::IsRTL

Determines whether right-to-left (RTL) support is enabled.

CMFCToolBarImages::IsReadOnly

Determines whether the toolbar images are read-only.

CMFCToolBarImages::IsScaled

Tells whether the underlined images are scaled or not.

CMFCToolBarImages::IsUserImagesList

Determines whether this set of toolbar images contains user-defined images.

CMFCToolBarImages::IsValid

Determines whether this set of toolbar images contains a valid toolbar image.

CMFCToolBarImages::Load

Loads toolbar images from system resources or from a file.

CMFCToolBarImages::LoadStr

 

CMFCToolBarImages::MapFromSysColor

 

CMFCToolBarImages::MapTo3dColors

 

CMFCToolBarImages::MapToSysColor

 

CMFCToolBarImages::MapToSysColorAlpha

 

CMFCToolBarImages::Mirror

Horizontally mirrors all of the toolbar images.

CMFCToolBarImages::MirrorBitmap

Horizontally mirrors a bitmap.

CMFCToolBarImages::MirrorBitmapVert

 

CMFCToolBarImages::MirrorVert

 

CMFCToolBarImages::OnSysColorChange

 

CMFCToolBarImages::PrepareDrawImage

Allocates the resources that are required to draw a toolbar image at a specified size.

CMFCToolBarImages::Save

Stores the toolbar images in a file if this set of toolbar images contains user-defined images.

CMFCToolBarImages::SetAlwaysLight

 

CMFCToolBarImages::SetDisabledImageAlpha

Sets the alpha channel value that is used for disabled images.

CMFCToolBarImages::SetFadedImageAlpha

 

CMFCToolBarImages::SetImageSize

Sets the size of a toolbar image (source size).

CMFCToolBarImages::SetLightPercentage

 

CMFCToolBarImages::SetMapTo3DColors

 

CMFCToolBarImages::SetPreMultiplyAutoCheck

 

CMFCToolBarImages::SetSingleImage

 

CMFCToolBarImages::SetTransparentColor

Sets the transparent color of the toolbar images.

CMFCToolBarImages::SmoothResize

Smoothly resizes underlined images.

CMFCToolBarImages::UpdateImage

Updates a user-defined toolbar image from a bitmap.

Protected Methods

Name

Description

CMFCToolBarImages::PreMultiplyAlpha

 

Data Members

Name

Description

CMFCToolBarImages::m_bDisableTrueColorAlpha

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 VisualStudioDemo Sample: MFC Visual Studio Application.

    CMFCToolBarImages m_Image;


...


        m_Image.SetImageSize (CSize (32, 32));
        m_Image.Load(IDR_START);
        m_Image.SetTransparentColor(RGB(255, 0, 255));

Inheritance Hierarchy

CObject

   CMFCToolBarImages

Requirements

Header: afxtoolbarimages.h

See Also

Reference

Hierarchy Chart

CObject Class

CMFCToolBar Class

CMFCToolBarButton Class

Other Resources

MFC Classes