Share via


CommandBands_GetCommandBar (Compact 2013)

3/28/2014

This 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
);

Parameters

  • hwndCmdBands
    Handle to the command bands control's window. This handle is returned when the command bands control is created by the CommandBands_Create function.
  • uBand
    Unsigned integer that contains the 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 Value

The window handle to the command bar identified by the index in the wBandIDparameter indicates success. NULL indicates failure.

Remarks

The index you pass in the wBandIDparameters 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.

Requirements

Header

commctrl.h

Library

commctrl.lib

See Also

Reference

Command Bands Functions
CommandBands_Create
RB_IDTOINDEX