void CModalFormDlg::OnButton3() {CDialog* dlg=NULL;dlg=new CDialog; dlg-> Create(IDD_DIALOG2,this);dlg-> ShowWindow(SW_SHOW);}这样就可以创建一个对话框了。