我知道用Domodal()肯定不行,因为这个是cdialog类的cformview该怎么弄呢?

解决方案 »

  1.   

    为啥非得是cformview呢,对话框不行呀?
      

  2.   

    例如有个form叫做LoginForm,那么在LoginForm中写如下代码:CLoginForm* CLoginForm::CreateForm(CWnd* parent)
    {
    CRuntimeClass* pClass = RUNTIME_CLASS(CLoginForm);
    ASSERT(pClass); CWnd *pWindow = (CWnd *)pClass->CreateObject();   
    ASSERT(pWindow); pWindow->Create(NULL, NULL, WS_CHILD, CRect(0, 0, 0, 0), parent, 0); return (CLoginForm *)pWindow;
    }使用的时候这么弄:CLoginForm* m_pLoginForm;
    m_pLoginForm = CLoginForm::CreateForm(this);
    m_pLoginForm->ShowWindow(SW_SHOW);
      

  3.   

    'CPrintListCtrlTesterView::CreateForm' : illegal call of non-static member function
    这个是什么回事?
      

  4.   

    错误提示是说:编译时发现用调用静态成员函数的方法调用了非静态的成员函数学会看错误提示哦~忘记告诉你要这么定义了:static CLoginForm* CreateForm(CWnd* parent);
      

  5.   

    在你的类里应该是:
    static CPrintListCtrlTesterView* CreateForm(CWnd* parent);
      

  6.   

    对 根据提示 我debug了 没有错误 但是cformview出不来
      

  7.   

    Creating a pane with no CDocument 这个问题
      

  8.   

    能出来的,在你调用的窗体上,多试试,formview其实就是个没有边框的窗体
    这样试试:
    CPrintListCtrlTesterView frm;
    frm.Create(....);
    frm.ShowWindow(SW_SHOW);