IToolbar::AddBitmap method (mmc.h)

The IToolbar::AddBitmap method enables a snap-in to add an image to the toolbar.

Syntax

HRESULT AddBitmap(
  [in] int      nImages,
  [in] HBITMAP  hbmp,
  [in] int      cxSize,
  [in] int      cySize,
  [in] COLORREF crMask
);

Parameters

[in] nImages

An index of images that are available. A value that specifies the number of images in the bitmap being passed in hbmp.

[in] hbmp

A handle to the bitmap to be added to the toolbar.

Note  The snap-in owns this resource and must free it. A memory leak will occur if the snap-in does not free hbmp.
 

[in] cxSize

The height, in pixels, of the bitmap to be added. (In version 1.0, MMC only supported a cxSize of 16.)

[in] cySize

The width, in pixels, of the bitmap to be added. (In version 1.0, MMC only supported a cySize of 16.)

[in] crMask

The color used to generate a mask to overlay the images on the toolbar buttons.

Return value

This method can return one of these values.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header mmc.h
DLL Mmcndmgr.dll

See also

IToolbar