CCommandBar::AddAdornments
Adds a Close button, and optionally, Help and OK buttons, to the command bar.
BOOL AddAdornments(
Dword dwFlags = 0 );
Parameters
The following table describes the parameters for the AddAdornments method of the CCommandBar Class.
Parameter |
Description |
---|---|
dwFlags |
Specifies optional buttons to add to the command bar. The value is zero if only the Close button is needed, or a combination of the following values to create additional buttons:
ValueDescription
CMDBAR_HELPAdds a Help button to the command bar. When clicked, this button sends a WM_HELP message.
CMDBAR_OKAdds an OK button to the command bar. When selected, this button sends a WM_COMMAND message with IDOK as the message identifier.
|
Return Values
true if successful; otherwise, false.
Remarks
This method creates a minimum of two buttons: a separator that aligns the selected adornments to the right side of the command bar, and the selected adornments.
When a user clicks the Close, OK, or Help button, the message associated with that button is placed in the message queue of the application. Every command bar must have a Close button. The OK button and the Help button are optional.
Call this method after all other elements such as menus, buttons, and combo boxes are added to the command bar.
Existing applications should be redesigned to remove dependency on AddAdornments.
Requirements
Windows CE versions 5.0 and later.
Header file: Declared in Afxext.h.