Share via


CommandBands_AddAdornments (Windows Embedded CE 6.0)

1/6/2010

This function adds the Close button (X) to the upper right corner of the command bands control. You can also use it to add the Help button (?) and the OK button.

Syntax

BOOL CommandBands_AddAdornments(
  HWND hwndCmdBands, 
  HINSTANCE hinst, 
  DWORD dwFlags, 
  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_Create function.
  • hinst
    Handle to the application instance.
  • dwFlags
    Specifies the optional buttons to be added to the top band of the command bands control. This parameter can be a combination of the following values, or zero if neither of the optional buttons are needed.

    Value Description Message

    CMDBAR_HELP

    Help button

    WM_HELP

    CMDBAR_OK

    OK button

    WM_COMMAND (with IDOK as the message identifier)

  • prbbi
    Pointer to a REBARBANDINFO structure. Use this structure to customize the band that holds the adornments. This parameter can be NULL.

Return Value

TRUE indicates success. FALSE indicates failure.

Remarks

By default the adornments band is created with an identifier of 0xFFFFFFFF. You can use the REBARBANDINFO structure you pass in the prbbi parameter to override this identifier.

Requirements

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

See Also

Reference

Command Bands Functions
CommandBands_Create
REBARBANDINFO