CToolBar::LoadBitmap

Call this member function to load the bitmap specified by lpszResourceName or nIDResource.

BOOL LoadBitmap( 
   LPCTSTR lpszResourceName  
); 
BOOL LoadBitmap( 
   UINT nIDResource  
);

Parameters

  • lpszResourceName
    Pointer to the resource name of the bitmap to be loaded.

  • nIDResource
    Resource ID of the bitmap to be loaded.

Return Value

Nonzero if successful; otherwise 0.

Remarks

The bitmap should contain one image for each toolbar button. If the images are not of the standard size (16 pixels wide and 15 pixels high), call SetSizes to set the button sizes and their images.

Warning

CToolBar supports bitmaps with a maximum of 16 colors. When you load an image into a toolbar editor, Visual Studio automatically converts the image to a 16-color bitmap, if necessary, and displays a warning message if the image was converted. If you use an image with more than 16 colors (using an external editor to edit the image), the application might behave unexpectedly.

Requirements

Header: afxext.h

See Also

Reference

CToolBar Class

Hierarchy Chart

CToolBar::Create

CToolBar::SetButtons

CToolBar::SetSizes

CToolBar::LoadToolBar

Other Resources

CToolBar Members