Copyright: Splitter Bar Component Help


Splitter Bar Component - Overview

This component automatically inserts a dynamic splitter bar into the application’s frame window of your choice. A dynamic splitter bar is a vertical or horizontal line that is used to divide a window’s view into 2 or more panes. Dynamic means you can move the splitter bar at run time and customize the size of the panes.

The Splitter Bar component works with MDI (Multiple Document Interface) and SDI (Single Document Interface) MFC applications only. After the component is inserted into your application, you should be able to build it, execute it, and see that the splitter bars you inserted are fully functional.

Splitter Bar Component - Specifics

Splitter Bar Component - Results


Splitter Bar Component - Specifics

Follow the steps below to use this component:

     1. Open the project to which the splitter bar will be inserted.

     2. From the Project menu, choose Add to Project and then select
         Components and Controls from the expanded menu.

     3. Open the Developer Studio Components folder.

     4. Select the Splitter Bar component and choose the Insert button.

     5. Select the Splitter Bar options and choose the OK button.

     6. Build the Project.


Splitter Bar Component - Results

The following changes occur when the component is inserted:

•	A new protected member variable m_wndSplitter of type CSplitterWnd is added to the frame class declaration.

•	The frame class OnCreateClient member function is modified (or created if necessary) to contain all the relevant code that implements this feature. You can modify this code to change the number of rows and columns in your view if you want.

The code generated with this component is fully supported on the X86 and MIPS platforms. This component can only be inserted into MDI and SDI MFC projects. Attempts to insert this component into other project types generate an error message.

For more information, see the CSplitterWnd class in the Microsoft Foundation Class Library Reference of the Visual C++ Programmer’s Guide.


Splitter Bar Component Dialog

Set all the component options from this dialog.

Add splitbar to: Select the class for the frame that will contain the splitter bar(s). This combo box will automatically list all the CFrameWnd-derived classes in your project that are suitable to contain a splitter bar.

Type of splitter bar: Select Horizontal if you want your window view to have a maximum of 2 panes divided by a horizontal pane (2 rows).

Select Vertical if you want your window view to have a maximum of 2 panes divided by a vertical pane (2 columns).

Select Both if you want your window view to have a maximum of 4 panes divided by both verical and horizontal splitter bars. (2 rows and 2 columns).