A toolbar is a window whose buttons represent tools or menu items and actions. The toolbar can be located along the top, bottom, or sides of a frame window or can "float" and be positioned anywhere on your desktop. The floating toolbar can then be moved independently or you can "pin" the toolbar to the frame window. You can also have multiple tool bars with a variety of different toolbar buttons using text, bitmaps, or both.
A button class that inherits from ICustomButton and provides drawing behaviour for the buttons in a toolbar. These buttons accept text and a bitmap and can draw bitmaps transparently without the need for a mask bitmap. Bitmaps used in these buttons must be created with one color reserved as the transparent color. By default this color is pink (255, 0, 255) but it can be changed on a per button basis.
The classes that comprise the toolbar are also shipped with common text and bitmaps for frequently used functions found on a toolbar. This ensures a common look among applications and products. In addition, toolbar buttons support a standard style to ensure a consistent look across applications.
The toolbar is essentially a frame extension with buttons that represent common actions. You can add both fly-over help and drag-and-drop support on the toolbar. You can use the direct manipulation support to rearrange the toolbar buttons within an application or add new buttons from a menu (PM only).
The IToolBar class creates and manages a toolbar area for a frame window. You can use the following classes to create tool bars:
When you construct controls for a toolbar, you must explicitly add them to the toolbar using one of the following member functions:
The following classes are used by IToolBar and IToolBarButton to implement a toolbar:
The
maximize and restore button on an IToolBarFrameWindow
allows you to expand and collapse the toolbar contained
in the toolbar frame window. You can shrink the toolbar
to recover screen area when you are not actively using
the toolbar and later expand the toolbar to show all
toolbar controls.
IToolBarFrameWindows
are visually distinct from other PM frame windows. The
title bar height of IToolBarFrameWindows are smaller than
other frame windows. In addition, this small frame window
contains two buttons that appear where the frame window's
minimize and maximize buttons normally are.
The left button is a toggle button that allows you to pin or attach a toolbar frame window to its owning frame window. This keeps the toolbar in the same location relative to its owner frame window when the owner is moved.
The right button allows you to expand and collapse the toolbar contained in the toolbar frame window. You can then reduce the size of the toolbar when it is not in use. Select the button again to expand the toolbar and show all the toolbar controls.
Adding Toolbars
Providing Help Information
Using Default Direct Manipulation
Enabling Direct
Manipulation
Adding Images
to Drag Items
IFlyOverHelp
IToolBar
IToolBarButton
IToolBarContainer
IToolBarTitle
IToolBarFrameWindow
ICustomButton
ICustomButtonDrawEvent
ICustomButtonDrawHandler