整个界面是基于对话框的, 界面左边是一个树控件(CTreeCtrl), 上面有若干节点, 我希望在点选每个节点的时候, 界面右边都出现不同的阿哦预先设定好的对话框.我想知道这些对话框能不能用CPropertyPage和CPropertySheet结构来实现, 或是有更好的方法.
谢谢

解决方案 »

  1.   

    可以用CPropertyPage和CPropertySheet结构来实现。
      

  2.   

    用CView和CFrameWnd!CFrameWnd theFrame = new CMainFrame;CRuntimeClass* pNewViewClass = RUNTIME_CLASS(CView);就是说CMainFrame是CFrameWnd,然后你所说的出现预定的对话框就是CView!到时候做个切换就行了!象下面这样!CRuntimeClass* pNewViewClass;switch(供判断的标志,比方说树的节点)
    {
    case:1
       pNewViewClass = RUNTIME_CLASS(CView1);
    case:2
       pNewViewClass = RUNTIME_CLASS(CView2);
    }
    // create the new view
    CCreateContext context;
    context.m_pNewViewClass = pNewViewClass;
    context.m_pCurrentDoc = GetActiveDocument();
    CView* pNewView = STATIC_DOWNCAST(CView, CreateView(&context));if (pNewView != NULL)
    {
    // the new view is there, but invisible and not active...
    pNewView->ShowWindow(SW_SHOW);
    pNewView->OnInitialUpdate();
    SetActiveView(pNewView);
    RecalcLayout();
    pNewView->UpdateWindow();}
    记得销毁当前的CView!明白?
      

  3.   

    www.51ui.cn 承接界面设计外包