我想自己6级得水平没什么问题吧。
CMainFrame
As in EX20A, the EX20B application's main frame window class needs a splitter window data member and a prototype for an overridden OnCreateClient function. You can let AppWizard generate the code by specifying Use Split Window, as in EX20A. You won't have to modify the MainFrm.h file. The implementation file, MainFrm.cpp, needs both view class headers (and the prerequisite document header), as shown here: 
#include "PoemDoc.h"
#include "StringView.h"
#include "HexView.h"
AppWizard generates dynamic splitter code in the OnCreateClient function, so you'll have to do some editing if you want a static splitter. Instead of calling CSplitterWnd::Create, you'll call the CSplitterWnd::CreateStatic function, which is tailored for multiple view classes. The following calls to CSplitterWnd::CreateView attach the two view classes. As the second and third CreateStatic parameters (2, 1) dictate, this splitter window contains only two panes. The horizontal split is initially 100 device units from the top of the window. The top pane is the string view; the bottom pane is the hex dump view. The user can change the splitter bar position but the view configuration cannot be changed. 
BOOL CMainFrame::OnCreateClient( LPCREATESTRUCT /*lpcs*/,
    CCreateContext* pContext)
{
    VERIFY(m_wndSplitter.CreateStatic(this, 2, 1));
    VERIFY(m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CStringView),
                                    CSize(100, 100), pContext));
    VERIFY(m_wndSplitter.CreateView(1, 0, RUNTIME_CLASS(CHexView),
                                    CSize(100, 100), pContext));
    return TRUE;
}

解决方案 »

  1.   

    用了RUNTIME_CLASS就要在你的类里加上DECLARE_DYNAMIC, DECLARE_DYNCREATE, or DECLARE_SERIAL 并且有相应的IMPLEMENT_xxx
      

  2.   

    1.应该检查一下你的CTopViewt和CRandView定义中有无定义
              DECLARE_DYNAMIC(CTopViewt,CView);
         DECLARE_DYNAMIC(CRandViewt,CView);

              DECLARE_DYNCREATE(CTopViewt,CView);
         DECLARE_DYNCREATE(CRandViewt,CView);
    2.应该检查一下你的CTopViewt和CRandView执行本中有无定义
             IMPLEMENT_DYNAMIC(CRandViewt,CView)
             IMPLEMENT_DYNAMIC(CTopViewt,CView)

             IMPLEMENT_DYNCREATE(CRandViewt,CView)
             IMPLEMENT_DYNCREATE(CTopViewt,CView)
    如果有就应该没问题。
      

  3.   

    《技术内幕》第四版的例子,你自己看看吧,
    生成时要指定Use Split Window
      

  4.   

    哥们,我自己发现问题了。在生成新类时偷懒,顺手让电脑替我做了,基类为CDialog,应该为  CFormView.谢了!!
    见者有份!!!我出手大方吧!!