CCeCommandBar::AddAdornments

This method adds the Close button (X) to the command bar, as well as the optional Help (?) and OK buttons.

At a Glance

Header file: Wcebar.h
Platforms: Palm-size PC, H/PC Pro
Windows CE versions: 2.10 and later

Syntax

BOOL AddAdornments(DWORD dwFlags = 0);

Parameters

dwFlags
Specifies the optional buttons to be added to the command bar. It can be zero if only the Close button is needed, or a combination of the following values:
CMDBAR_HELP
Adds a help button to the command bar. When selected by a user, this button sends a WM_HELP message.
CMDBAR_OK
Adds an OK button to the command bar. When selected by a user, this button sends a WM_COMMAND message with IDOK as the message identifier.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

This method creates a minimum of two buttons; a separator that aligns the selected adornment(s) to the right side of the command bar and the selected adornment(s).

When a user selects the Close (X), OK, or Help (?) button, the message associated with that button is placed in the application’s message queue. Every command bar has to have a Close button. The OK button and the Help button are optional.

Do not call the this method until after all the other elements (menus, buttons, combo boxes) have been added to the command bar.