我有两个类都继承于CDialog,传进CSplitterWnd::CreateView里会出现断言,但换成两个CView的子类就是好的。这正常吗?

解决方案 »

  1.   

    正常,MFC就是这样设计的。
    debug的ASSERT通过了,也通不过后面的处理。
      

  2.   

    不过你可以把你辛辛苦苦做的Dialog放到CView里面。
      

  3.   

    CSplitterWnd::CreateView
    This method creates the panes for a static splitter window. All panes of a static splitter window must be created before the framework displays the splitter.The framework also calls this method to create new panes when the user of a dynamic splitter window splits a pane, row, or column
    所以可以尝试在View或者window上面来实现了。
      

  4.   

    CSplitterWnd::CreateView
    This method creates the panes for a static splitter window. All panes of a static splitter window must be created before the framework displays the splitter.The framework also calls this method to create new panes when the user of a dynamic splitter window splits a pane, row, or column
    所以可以尝试在View或者window上面来实现了。