This method adds the Close button (X) to the command bar. You can also use it to add the Help button (?) and the OK button.
Header file: | Afxwin.h |
Platforms: | H/PC 2.0, Palm-size PC, H/PC Pro |
Windows CE versions: | 1.0 and later |
BOOL AddAdornments( DWORD dwflags );
Value | Description | Message |
---|---|---|
CMDBAR_HELP | Help button | WM_HELP |
CMDBAR_OK | OK button | WM_COMMAND (with IDOK as the message identifier) |
TRUE indicates success. FALSE indicates failure.
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 CFrameWnd::AddAdornments method until after you add all the other elements (menus, buttons, combo boxes) to the command bar.
This method of the CFrameWnd class is unique to Windows CE.