Basic Tasks to Add Splitter Windows

Study the following technique for adding splitter windows to an application:

  1. Derive a frame window class from CMDIChildWnd if you are writing an MDI application.

    Because you specified Scribble as an MDI application, AppWizard generated a CChildFrame class for you, derived from CMDIChildWnd.

  2. Give this class a member variable of type CSplitterWnd. (For SDI applications, add the member variable to your CMainFrame class.)

    This is the window that covers the frame window’s client area.

  3. Override the OnCreateClient member function of your frame window class to create a CSplitterWnd. (For SDI applications, the frame window class is CMainFrame.)

    The framework calls OnCreateClient when it first creates the frame window. For Scribble, you will override the OnCreateClient member function of CChildFrame.