CommandBands_GetCommandBar

The CommandBands_GetCommandBar function retrieves the handle to a command bar child control in a band of the command bands control.

Syntax

HWND CommandBands_GetCommandBar (HWND hwndCmdBands, UINT uBand);

At a Glance

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

Parameters

hwndCmdBands
The command bands control's window handle. This handle is returned when the command bands control is created by the CommandBands_Create function.
uBand
Zero-based index of the band containing the command bar. If the user has had an opportunity to reposition the bands, use the RB_IDTOINDEX message to get the index of the band before passing the index to this function.

Return Values

The window handle to the command bar identified by the index in the wBandID parameter. If this function fails, it returns a value of NULL.

Remarks

The index you pass in the wBandID parameter is the current position of the command bar band in the command bands control. This index may have a different value than the order in which you added the band to the control, because the user may have repositioned the band.

See Also

CommandBands_Create RB_IDTOINDEX