m_pDlg = new mydlg(); m_pDlg->Create(IDD_DIALOG1,this); m_pDlg->CenterWindow(); m_pDlg->ShowWindow(SW_SHOW);