CBARTEST

The CBARTEST sample demonstrates how to add a command bar to your application window. This application creates an application window with a command bar that contains a menu, a toolbar, a combo box, and the Help, OK, and Exit buttons.

When you select one of these options, the application resets the command bar and adds the selected objects for display. Menu options act as toggles. They are checked if the object is displayed in the command bar, unchecked if it is not currently displayed.

The menu options allow you to add and/or remove the following:

Pressing one of the toolbar buttons will produce a message box, confirming that the WM_COMMAND message was routed to the application specific class, CMainWindow.

This sample demonstrates the following keywords:

CDC::DrawText

CDialog::DoModal

CDialog::OnOK

CFrameWnd::AddAdornments

CFrameWnd::AddComboBoxString

CFrameWnd::InsertButtons

CFrameWnd::InsertComboBox

CFrameWnd::InsertMenu

CFrameWnd::LoadFrame

CMenu::CheckMenuItem

CWinApp::InitInstance

CWnd::GetClientRect

CWnd::MessageBox

CWnd::OnPaint

CWnd::ShowWindow

CWnd::UpdateWindow

PostQuitMessage

You can find the CBARTEST project files in the Wce\Samples\Mfc\CBARTEST directory.

For information on the Windows CE platforms that support this sample, see MFC for Windows CE Samples.