CommandBands_AddAdornments

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.

At a Glance

Header file: Commctrl.h
Windows CE versions: 2.0 and later

Syntax

BOOL CommandBands_AddAdornments (HWND hwndCmdBands, HINSTANCE hinst, DWORD dwFlags, LPREBARBANDINFO prbbi);

Parameters

hwndCmdBands

Handle to the he 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 Values

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.

See Also

CommandBands_Create, REBARBANDINFO