CommandBar_AddBitmap

The CommandBar_AddBitmap function adds one or more images to the list of button images available for use in the command bar.

Syntax

int CommandBar_AddBitmap(HWND hwndCB, HINSTANCE hInst, int idBitmap, int iNumImages, int iReserved, int iReserved);

At a Glance

Header file: Commctrl.h
Component:  
Platforms: H/PC
Windows CE versions: 1.0 and later

Parameters

hwndCB
The command bar's window handle. This handle is returned by the CommandBar_Create function when the command bar is created.
hInst
Handle to an instance of the executable module that contains the bitmap resource.
idBitmap
Identifier of the bitmap resource that contains the button images. If you specify HINST_COMMCTRL in the hInst parameter, you can use system-defined button bitmaps by specifying one of the following values.
IDB_STD_SMALL_COLOR
Adds small, color standard bitmaps.
IDB_VIEW_SMALL_COLOR
Adds small, color view bitmaps.
iNumImages
Number of button images in the bitmap. This can be zero if the bitmap being added is one of the system defined bitmaps — standard or view.

Return Values

The index of the first new image. If this function fails, it returns a value of –1.

Remarks

Each button image should be 16×16 pixels in size.

The following values can be used as indexes to the standard and view bitmaps:

STD_COPY STD_PROPERTIES
STD_CUT STD_REDOW
STD_DELETE STD_REPLACE
STD_FIND STD_PASTE
STD_FILENEW STD_PRINT
STD_FILEOPEN STD_PRINTPRE
STD_FILESAVE STD_UNDO
STD_HELP  
VIEW_DETAILS VIEW_SORTDATE
VIEW_LARGEICONS VIEW_SORTNAME
VIEW_LIST VIEW_SORTSIZE
VIEW_SMALLICONS VIEW_SORTTYPE

Windows CE 1.0 only supports 2 bits per pixel (2bp) gray scale, so the bitmaps will not be displayed in color on Windows CE 1.0 platforms.

See Also

CommandBar_Create