Command Bars Examples

The following sample applications demonstrate the powerful features that are available with Codejock Command Bar components.

Each sample is provided as a stand alone executable that can be easily downloaded. All samples are included with our products and are provided with complete source code.


Command Bars Sample

Command Bars Sample demonstrates most all of the CommandBars features and related aspects combined in one application. You will see how to create and manage complex fully-featured toolbars and menus that include various controls and have different layout in MDI, SDI and dialog applications, how to create and use custom themes and how themes can be applied in a multi-window application.

Sample Uses:
Command Bars

CommandBarsSample.zip
 Size: 10.84 Mb

Command Bars Sample

Command Bar Icons

This sample demonstrates how to use ImageManager for managing CommandBars icons. Each icon can be represented as a set of state specific images for normal, hot, pressed and disabled button states. The sample also features new vector icons that enable true DPI independent user experience.

Sample Uses:
Command Bars

CommandBarIcons.zip
 Size: 9.97 Mb

Command Bars Icons

Command Bar Controls

The CommandBars Controls sample demonstrate the various features and functionality of the types of Controls you can add to Command Bars. This sample will show you how to drag and drop various commands to the toolbar for easy customization. You will see how to create shortcut keys to the various commands, and see how easy it is to move the CommandBars positioning on the Ribbon Bar.

Sample Uses:
Command Bars

CommandBarControls.zip
 Size: 9.67 Mb

Command Bars Controls

Multi-Language

This sample demonstrates how to create commandbars that support different languages. In the sample you can select from English, German, Japanese, Arabic, and Russian. The CommandBars comes with a language dll resource file for each of the 32 languages supported. The dll files come with a translated string for all strings that can not be changed by the developer, for example, the customization dialog.

Sample Uses:
Command Bars

MultiLanguage.zip
 Size: 4.07 Mb

Command Bars Scribble Sample

Actions Sample

Commandbar actions eliminate the need to use the update notification\event to update\change the state and properties of an item that appears multiple places in your menus and toolbars. All that is needed now is a single line of code placed almost anywhere in your application to update all controls that contain the same id. For example, if you have a command that appears in both a menu and a toolbar, and a user creates a custom toolbar with the same command, modifying the action for the command will update all occurrences of that item, no matter how many have been defined.

Sample Uses:
Command Bars

ActionsSample.zip
 Size: 6.71 Mb

Command Bar Actions

Common Controls

The Common Controls sample demonstrates how to add a "custom" control to a toolbar. A custom control can be a date picker, animated gif, slider, option button, etc, you can pretty much add any control to a toolbar. Buttons can be displayed differently if the toolbar is docked vertically or horizontally. The controls in a toolbar can be hidden, displayed normally, or shown as a button when docked vertically.

Sample Uses:
Command Bars, Controls

CommonControls.zip
 Size: 2.29 Mb

Command Bars Common Controls

Customize Dialog

The Customize Dialog sample demonstrates how to display the commandbars customize dialog. You will see how to add a custom tab to the commandbars customization dialog. There will be some menu items that illustrate how to execute other programs such as NotePad and Paint.

Sample Uses:
Command Bars, Controls

CustomizeDlg.zip
 Size: 2.31 Mb

Command Bars Customize Dialog

Custom Themes

The Custom Themes sample demonstrates how to create a custom theme for the command bars. Several different custom theme examples are provided that show how to only change the color of the toolbar to changing the actual shape of buttons in the toolbars. One of the menu items illustrates how to create a scrolling menu for menus that will contain more items than can be displayed on the screen. You will also see how to include a combo box as a menu item that is used as a simple search tool. Other features demonstrated include displaying the customize dialog, docking a toolbar to the left and bottom of the application and intelligent menus.

Sample Uses:
Command Bars, Task Panel

CustomThemes.zip
 Size: 3.45 Mb

Command Bars Custom Themes

Designer Sample

The Designer sample simply demonstrates how to load a commandbar that was created with the CommandBars Designer Studio. In this sample a XCB file will be loaded.

Sample Uses:
Command Bars

DesignerSample.zip
 Size: 2.31 Mb

Command Bars Designer

Dialog Sample

The Dialog sample demonstrates how to add a commandbar to a dialog application. You need to use the OnKickIdle method for the command bars to receive UI update messages, clicks, etc.

Sample Uses:
Command Bars, Controls

DialogSample.zip
 Size: 2.26 Mb

Command Bars Dialog Sample

Dynamic Popups

The Dynamic Popups sample demonstrates several different ways to create a command bar popup dynamically. There are two popup menus that are dynamically created and one will display your Internet Explorer favorites and the other will display the contents of your Desktop. Then there is a toolbar button popup and combo box that will display the content of a list box so they are created dynamically each time they are displayed.

Sample Uses:
Command Bars, Controls

DynamicPopups.zip
 Size: 2.29 Mb

Command Bars Dynamic Popups

Gallery Sample

This Gallery sample demonstrates how to add a gallery to a toolbar. The Office 2007 style gallery control can be used in the toolbar, ribbon group, or popup menu. The gallery control displays a collection of picture or text items that can be scrolled and displayed in your popup menu, standard toolbar, or ribbon group. For example, a galley can be used to create an Office 2007 font or size popup drop-down menu and popup color selector.

Sample Uses:
Command Bars

GallerySample.zip
 Size: 5.68 Mb

Command Bars Gallery Sample

Help Context

The Help Context sample demonstrates how to implement contextual help with the command bars and various other objects in your application. Using help context is a great way to provide help to your users.

Sample Uses:
Command Bars

HelpContext.zip
 Size: 2.32 Mb

Command Bars Help Context

Intelligent Menus

The Intelligent Menus sample demonstrates how to create "intelligent" menus. An intelligent menu behaves similar to the Windows XP start menu's most recently used feature. You specify which commands in a popup menu have not been used recently and they will not be displayed in the popup menu. Instead an expand button will appear at the bottom of the menu. When the expand button is clicked the entire menu will be displayed. The background color of the recently hidden commands will appear a different color.

Sample Uses:
Command Bars

IntelligentMenus.zip
 Size: 2.35 Mb

Command Bars Intelligent Menus

List Box Sample

The List Box sample demonstrates how to use our ControlListBox class as a popup in our toolbars. Codejock's list box is similar to that seen in MS Word. In the sample it is displayed as an "undo" and "redo" popup button. If you type some text in the client area you will see that the list box is populated with action you can undo and redo.

Sample Uses:
Command Bars

ListBoxSample.zip
 Size: 2.29 Mb

Command Bars List Box Sample

MDI Menus

The MDI Menus sample demonstrates how to hide\show menu items based on which type of View Document is currently active. The sample has three different View Document types you can choose from. If you load one of each type you will see some menu items and buttons hidden and\or displayed based on which View is active.

Sample Uses:
Command Bars

MDIMenus.zip
 Size: 2.3 Mb

Command Bars MDI Menus

MSDI

The MSDI Sample demonstrates how to create a multiple single document application. Each Frame is located in it's own thread. If you click the new button you will see the new document will be opened in it's own window.

Sample Uses:
Command Bars

MSDI.zip
 Size: 2.32 Mb

Command Bars MSDI

Notifications

The Notifications sample demonstrates using the CREATECOMMANDBAR, CREATECONTROL, INITCOMMANDSPOPUP, and AFTERCREATECONTROL commandbars notifications. CREATECOMMANDBAR is used to create a tear off popup of the Edit menu, REATECONTROL is used to add attributes to some buttons, INITCOMMANDSPOPUP is used to dynamically create a popup menu, and AFTERCREATECONTROL is used for control verification.

Sample Uses:
Command Bars

Notifications.zip
 Size: 2.29 Mb

Command Bars Notifications

ReBar Sample

The ReBar sample demonstrates how to add ReBars to your commandbars. ReBars are similar to commandbars except they can not be floated and they can not be docked anywhere but the top of the application.

Sample Uses:
Command Bars

ReBarSample.zip
 Size: 2.32 Mb

Command Bars Rebar Sample

Smart Layout

The smart layout sample demonstrates how to enable a toolbar to have a "smart" layout. Smart layout allows each item to have multiple image sizes. The largest images will be displayed when enough room is available and automatically display the smaller icons when space is tight. Not only are images swapped when the application is resized, but the items will be re-arranged so that they are always visible in the toolbar. When toolbar space is abundant, large images with item captions are displayed, if space is limited, then only small icons with no captions are displayed.

Sample Uses:
Command Bars

SmartLayout.zip
 Size: 2.38 Mb

Command Bars Smart Layout

Status Bar

The StatusBar sample demonstrates how to use Codjock's Status Bar control. You will see how to add an animated gif, progress bar, icons, and edit control to the status bar. Each button in the toolbar will have some description text that is displayed in the status bar.

Sample Uses:
Command Bars

StatusBar.zip
 Size: 3.29 Mb

Command Bars Status Bar

Tabbed Toolbar

The Tabbed Toolbar sample demonstrates how to add a tabbed toolbar to your command bars. Tabbed toolbars eliminate the need for numerous toolbars to be crowded at the top of your application. Switching between toolbar categories is similar to a TabControl, you can now access all of your toolbar categories simply by clicking on its tab.

Sample Uses:
Command Bars

TabbedToolbar.zip
 Size: 2.45 Mb

Command Bars Tabbed Toolbar

Tear Off Popups

The Tear Off Popups sample demonstrates how to create tear-off popups for popup menus. A tear-off popup is a popup menu that can be "torn" off and displayed as a separate commandbar. These commandbars can be used and docked like any other commandbar.

Sample Uses:
Command Bars

TearOffPopups.zip
 Size: 2.34 Mb

Command Bars Tear Off Popups

Tool Tip Context

The Tooltip Context sample demonstrates how to change the style of the tooltip displayed for the commandbars and tab workspace. Tooltips can be displayed as balloons, office style, or RTF style. You will see how to display shortcut keys in tooltips as well as how to change the color of tooltips.

Sample Uses:
Command Bars

ToolTipContext.zip
 Size: 2.34 Mb

Command Bars Tooltip Context
New Year Sale 2025