CommandBar_AddBitmap (Windows CE 5.0)

Send Feedback

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

intCommandBar_AddBitmap(HWNDhwndCB, HINSTANCEhInst, intidBitmap, intiNumImages, int iImageWidth,intiImageHeight);

Parameters

  • hwndCB
    Handle to the command bar's window. 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.
    Value Description
    IDB_STD_SMALL_COLOR Adds small, color standard bitmaps.
    IDB_VIEW_SMALL_COLOR Adds small, color view bitmaps.
  • iNumImages
    Integer that specifies the 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.
  • iImageWidth
    Reserved, set this value to zero.
  • iImageHeight
    Reserved, set this value to zero.

Return Values

The index of the first new image indicates success. A value of –1 indicates failure.

Remarks

Each button image should be 16x16 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 bitmap is not displayed in color.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Commctrl.h.
Link Library: Commctrl.lib.

See Also

CommandBar_Create

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.