|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
This class enables you to create and modify command bars. A command bar is a toolbar that can include a menu bar as well as a Close button, a Help button, and the OK button. A command bar can contain menus, combo boxes, buttons, and separators. A separator is a blank space used to divide other elements into groups or to reserve space in a command bar. After you create a CCommandBar object, use the InsertMenuBar, InsertComboBox, and InsertSeparator methods to insert menu bars, combo boxes, and separators, respectively. When you finish adding all other elements to the command bar, use the AddAdornments method to add the Cancel button, and optionally, the Help and OK buttons. Use the DrawMenuBar method to redraw the command bar each time you modify a menu on the command bar.
In Windows CE 5.0, CDialog::m_pWndEmptyCB member is no longer supported and you control the creation and insertion process. Previously, this member variable was used to point to the empty CommandBar or MenuBar on Pocket PC.