做了一个基于对话框的程序,现在想把原来的主对话框改变成弹出对话框。 
不知道怎么改?

解决方案 »

  1.   

    那你就在应用程序类里面的InitInstance()里面改呀
    把那个有关你的对话框类的东东删了
      

  2.   

    假如你的基于对话框的工程名叫My
    vfb wq 那你就在MyApp.cpp文件里的InitInstance()
    删了如下内容
             CMyDlg dlg;
    m_pMainWnd = &dlg;
    int nResponse = dlg.DoModal();
    if (nResponse == IDOK)
    {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
    }
    else if (nResponse == IDCANCEL)
    {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
    }
      

  3.   

    我是这样作的,我在MyApp的头文件中加上了现在让首先启动的对话框类的头文件,然后把
    CMyDlg dlg;
    m_pMainWnd=&dlg;
    改为
    CMyFirstRunDlg dlg;
    m_pMainWnd=&dlg;
    然后在MyFirstRunDlg的InitDialog函数中定义CMyDlg并创建后,弹出
    运行后一切正常