The Splitter Control

Overview
License
Download

Overview

When developing Windows applications designers often want to split a window into several panes and display different information in each pane (for example, have a TreeView control in the left pane and display information about the selected item in the right pane).

As long as the pane positions are fixed, this is all quite simple. But often designers want to give the user (some) control over where a split between panes is positioned. When using the Microsoft Foundation Classes (MFC) splitter window functionality is supported by the class CSplitterWnd. However, when programming plain Win32, this is a Do-It-Yourself effort.

The Splitter Control has been designed to provide support for east-west, north-south and 4-way split windows.

An application can set the X and/or Y positions of the split(s), the width of the split(s) as well as the margins for dragging the split(s) using the Splitter Control message and/or macro interfaces. An application will normally pass View window handles to the Splitter Control. The Splitter Control will then take care of showing, hiding, moving and resizing of the View windows to fill the panes, otherwise the application will have to do this itself when receiving Splitter Control notification messages.

The way the Splitter Control has been designed preserves the normal parent/child relationship between the parent window and an embedded (for example TreeView) control, thus enabling the parent window to receive and process notifications from the embedded controls.

License

The Splitter Control is distributed under the terms of the GNU General Public License (GPL).

Download

Click here to download the Splitter Control. The ZIP-file includes a compiled library, sources, HTML Help documentation as well as a sample application demonstrating the use of the Splitter Control.


Pagemaster: Roger Hünen. Last update: 28 january 2002.