For a multiple-document interface (MDI) application such as Scribble to support splitting, objects of three classes must cooperate to display a document:
CScribbleView
objects, each of which manages a pane in the window
The CSplitterWnd object is not visible as a distinct entity, but it is responsible for handling the CScribbleView
objects as panes, managing their scroll bars, and drawing the split boxes and split bars.
This technique for managing splitter windows is similar to the implementation of MDI in general. A client window manages the entire client area, or workspace, of an MDI application’s frame window. It is this client window that owns the child windows that display documents.
Because you specified Scribble as an MDI application, AppWizard creates the CChildFrame
class, derived from CMDIChildWnd. You’ll add the code to support splitter windows in Scribble to this class. If Scribble were a single-document interface (SDI) application, you would add the splitter window functionality directly to the CMainFrame class.
You can add splitter window functionality to your application in one of two ways:
You’ll use the manual method for Scribble to learn how simply the framework implements this feature. The method for using AppWizard is described later in this lesson, in the topic Adding Splitter Window Functionality by Using AppWizard.