CommandBands_AddAdornments

The CommandBands_AddAdornments 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);

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.
hinst
Application instance handle.
dwFlags
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 Meaning Message
CMDBAR_HELP Help button WM_HELP
CMDBAR_OK OK button WM_COMMAND (with IDOK as the message identifier)

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

Return Values

TRUE if the function succeeds. FALSE if it fails.

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