共用方式為


CBitmap::LoadMappedBitmap

Call this member function to load a bitmap and map the colors to the current system colors.

BOOL LoadMappedBitmap(
   UINT nIDBitmap,
   UINT nFlags = 0,
   LPCOLORMAP lpColorMap = NULL,
   int nMapSize = 0 
);

Parameters

  • nIDBitmap
    The ID of the bitmap resource.

  • nFlags
    A flag for a bitmap. Can be zero or CMB_MASKED.

  • lpColorMap
    A pointer to a COLORMAP structure that contains the color information needed to map the bitmaps. If this parameter is NULL, the function uses the default color map.

  • nMapSize
    The number of color maps pointed to by lpColorMap.

Return Value

Nonzero if successful; otherwise 0.

Remarks

By default, LoadMappedBitmap will map colors commonly used in button glyphs.

For information about creating a mapped bitmap, see the Windows function CreateMappedBitmap and the COLORMAP structure in the Windows SDK.

Requirements

Header: afxwin.h

See Also

Reference

CBitmap Class

Hierarchy Chart

LoadBitmap

CreateMappedBitmap

Other Resources

CBitmap Members