hello
my problem is i have created a SDI application.
i have a dialog in it .which contains OK and CANCEL buttons. it also contains an Edit control.
i have to get data from the edit control and display it to view.
the steps that i have done r
created a menu which has (Dialog->ModalDlg[item])
Code:void CModalTestView::OnDialogModalDlg() { CTestDlg dlg; dlg.DoModal(); //CEdit* edName=(CEdit*)GetDlgItemText(IDC_EDIT_NAME,dlg.m_strNAME); //CString m_strNAME int nRet = dlg.DoModal(); if(nRet == IDOK) { AfxMessageBox(dlg.m_strNAME); } }
Code:void CMyDialog::OnOK() //CMyDialog is dialog box class derived from CDialog { GetDlgItemText(IDC_NAME,m_strName1); CClientDC dc(this); dc.TextOut(110,100,m_strName,m_strName.GetLength()); //CDialog::OnOK(); }
this is what i have written plz correct this.or plz give me suggestions
my problem is to get text from editcontrol and display it to view when i click OK button.


Reply With Quote
Victor Nijegorodov 
Bookmarks