void CWindowsDlg::OnOK() { //Start if if(!IsWindow(m_Student.m_hWnd)) { m_Student.Create(IDD_STUDENTDLG,NULL); } else { m_Student.ShowWindow (SW_SHOW); } //End if }