title: CSplitterWnd with two panes : left pane is CTreeView, Right is CFrameWnd : Not able to set different views in Right pane
body: <p>I am trying to implement a classic Windows Explorer kind of Application, 
  CpliterWnd has two panes : Left pane is CLeftTreeView : public CTreeView
  Right pane is CRightPaneFrame: public CFrameWnd , CRightPaneFrame has a member variable m_pCustomView.</p>
  
  <p>CustomView is a class i added to a dialog resource ( edited using Resource editor and Add class wizard)</p>
  
  <pre><code>class CustomView : public CFormView
  {
  
  DECLARE_DYNCREATE(CustomView)
  
  public:  // Changed to public so that i can instantiate this view on heap
  CustomView();           // protected constructor used by dynamic creation
  virtual ~CustomView();
  BOOL Create(LPCTSTR A, LPCTSTR B, DWORD C,
      const RECT&amp; D, CWnd* E, UINT F, CCreateContext* G); // To override the protected specifier of CFormView::Create()
  </code></pre>
  
  <p>MainFrame.cpp has the following entry</p>
  
  <pre><code>if (!m_SplitterWnd.CreateView(0, 0, RUNTIME_CLASS(CLeftTreeView), CSize(125, 100),   pContext) ||  !m_SplitterWnd.CreateView(0, 1, RUNTIME_CLASS(CRightPaneFrame), CSize(100, 100), pContext))    
  {
       m_SplitterWnd.DestroyWindow();
       return FALSE;
  }
  </code></pre>
  
  <p>And later on in CRightPaneFrame </p>
  
  <pre><code>BOOL CRightPaneFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
  {
      // TODO: Add your specialized code here and/or call the base class
      m_pCustomView = new CustomView;
      m_pCustomView-&gt;Create(NULL,NULL,0L,CFrameWnd::rectDefault,this,VIEW_CUSTOM, pContext);
      SetActiveView(m_pCustomView);
      m_pCustomView-&gt;ShowWindow(SW_NORMAL);
      RecalcLayout();
      return true;
  }
  </code></pre>
  
  <p>I don't know what I am doing wrong but the CustomView is not getting loaded in the right pane.</p>
  
  <p>Any suggestions on changing the approach or What is wrong with the current approach ??</p>