Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function adds one or more bands to the command bands control.

Syntax

BOOL CommandBands_AddBands(
  HWND 
hwndCmdBands, 
  HINSTANCE 
hinst, 
  UINT 
cBands, 
  LPREBARBANDINFO 
prbbi
);

Parameters

hwndCmdBands

Handle to the command bands control's window. This handle is returned when the command bands control is created by the CommandBands_Createfunction.

hinst

Handle to the application instance.

cBands

Number of bands to add.

prbbi

Pointer to an array of REBARBANDINFOstructures that contain information about the bands to add. There must be the same number of elements in the array as specified in the cBandsparameter.

Return Value

TRUE indicates success. FALSE indicates failure.

Remarks

By default, each band is created with a command bar as its child window. The command bar can be retrieved by using the CommandBands_GetCommandBarfunction. To create a different kind of child control in a band, use the RBBIM_CHILD mask in the fMaskfield of the REBARBANDINFOstructure, and specify the child control's window handle in the REBARBANDINFOstructure's hwndChildfield.

Requirements

Header commctrl.h
Library commctrl.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also