CommandBar_AddAdornments (Windows CE 5.0)

Send Feedback

This function adds the Close button (X) to the command bar. You can also use it to add the Help button (?) and the OK button.

BOOLCommandBar_AddAdornments(HWNDhwndCB, DWORDdwFlags, DWORD dwReserved);

Parameters

  • hwndCB
    Handle to the command bar's window. This handle is returned when the command bar is created by the CommandBar_Create function.
  • dwFlags
    Specifies the optional buttons to be added to the command bar. 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)
  • dwReserved
    Reserved; set to zero.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

When a user selects the Close, OK, or Help button, the message associated with that button is placed in the application's message queue.

Do not call the CommandBar_AddAdornments member function until after you have added all the other elements (menus, buttons, combo boxes) to the command bar.

This API is not intended to have a cumulative effect. Calling this function more than one time will cause unexpected behavior.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Commctrl.h.
Link Library: Commctrl.lib.

See Also

CommandBar_AddButtons | CommandBar_Create | CommandBar_InsertButton

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.