Flat Scroll BarsFlat Scroll Bars*
*Contents  *Index  *Topic Contents
*Previous Topic: DRAGLISTINFO
*Next Topic: Flat Scroll Bars Reference

Flat Scroll Bars


Microsoft® Internet Explorer Version 4.0 introduces a new visual technology called flat scroll bars. Functionally, flat scroll bars behave just like normal scroll bars. The only difference is they are not displayed three-dimensionally.

The following illustration shows a window that contains flat scroll bars.

Window that contains flat scroll bars.

Note Flat scroll bar APIs are implemented in version 4.71 and later of Comctl32.dll.

arrowy.gifUsing Flat Scroll Bars

arrowy.gifFlat Scroll Bars Reference

Using Flat Scroll Bars

This section describes how to implement flat scroll bars in your application.

Before You Begin

To use the flat scroll bar APIs, you must include Commctrl.h in your source files and link with Comctl32.lib.

Adding Flat Scroll Bars to a Window

To add flat scroll bars to a window, call InitializeFlatSB, passing the handle to the window. Instead of using the standard scroll bar APIs to manipulate your scroll bars, you must use the FlatSB_xxxx versions. There are flat scroll bar APIs for setting and retrieving the scroll information, range, and position. If flat scroll bars haven't been initialized for your window, the flat scroll bar APIs will defer to the corresponding standard APIs, if any exist. This allows you to turn flat scroll bars on and off without having to write conditional code.

Enhancing Flat Scroll Bars

FlatSB_SetScrollProp allows you to modify the flat scroll bars to customize the look of your window. You can set the width of a vertical scroll bar and the height of a horizontal scroll bar. You can also set the width (horizontal scroll bar) and the height (vertical scroll bar) of the scroll bar's direction arrows.

FlatSB_SetScrollProp also allows you to customize how the flat scroll bars are displayed. By changing the WSB_PROP_VSTYLE and WSB_PROP_HSTYLE properties, you can set the type of scroll bar that you wish to use. Three styles are available:

FSB_ENCARTA_MODE A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar will be displayed in 3-D.
FSB_FLAT_MODE A standard flat scroll bar is displayed. When the mouse moves over a direction button or the thumb, that portion of the scroll bar will be displayed in inverted colors.
FSB_REGULAR_MODE A normal, nonflat scroll bar is displayed. No special visual effects will be applied.

Removing Flat Scroll Bars

If you wish to remove flat scroll bars from your window, call the UninitializeFlatSB API, passing the handle to the window. This API only removes flat scroll bars from your window at run time. You do not need to call this API when your window is destroyed.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.