The Internet Explorer Rebar Toolbar

As we learned in Chapter 9, Visual C++ 6.0 contains many features that are part of Internet Explorer 4.0: the Internet Explorer Common Controls. One of the new controls in the IE Common Controls is a new kind of toolbar called a rebar.

You're probably already familiar with the rebar if you have ever used Internet Explorer 4.0. The rebar differs from the default MFC toolbar in that it provides grippers and allows the user to "slide" its horizontal and vertical positions, whereas the MFC toolbar's position is changed via drag-and-drop docking. Rebars also allow the developer to provide many more internal control types—such as drop-down menus—than are available in CToolBar.

Anatomy of a Rebar

Figure 14-5 shows the various terminology used on a rebar. Each internal toolbar in a rebar is called a band. The raised edge where the user slides the band is called a gripper. Each band can also have a label.

click to view at full size.

Figure 14-5. Rebar terminology.

MFC provides two classes that facilitate working with rebars:

  • CReBar—A high-level abstraction class that provides members for adding CToolBar and CDialogBar classes to rebars as bands. CReBar also handles communication (such as message notifications) between the underlying control and the MFC framework.
  • CReBarCtrl—A low-level wrapper class that wraps the IE ReBar control. This class provides numerous members for creating and manipulating rebars but does not provide the niceties that are found in CReBar.

Most MFC applications use CReBar and call the member function GetReBarCtrl, which returns a CReBarCtrl pointer to gain access to the lower-level control if needed.



Programming Visual C++
Advanced 3ds max 5 Modeling & Animating
ISBN: 1572318570
EAN: 2147483647
Year: 1997
Pages: 331
Authors: Boris Kulagin

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net