![]() |
|
#1
|
|||
|
|||
UpdateData - simple MFC projecthello,
Im trying to run simple MFC application program using UpdateData function. I defined simple dialog with Edit Control and I added variable as CString and when I push the OK button I want it to show me the text. under the following event: void CHelloDialogDlg::OnBnClickedOk() { UpdateData(TRUE); AfxMessageBox(m_string); //OnOK(); } but m_string have nothing after UpdateData. Do I miss something??? thanks Koby |
|
#2
|
|||
|
|||
Re: UpdateData - simple MFC projectHi, Try this... void CHelloDialogDlg::OnBnClickedOk() { char text[10]; //buffer to store editbox contents //UpdateData(TRUE); editCtrl->GetWindowText(text,12); //editCtrl - object of edit ctrl AfxMessageBox(text); } |
|
#3
|
|||
|
|||
Re: UpdateData - simple MFC projectthanks for your answer, but,
how can I use the editCtrl(I tried this: editCtrl->... but I get errors while compiling)??? thanks koby |
|
#4
|
|||
|
|||
Re: UpdateData - simple MFC projectu can use 'editCtrl' haha...cuz u dont declare a CEdit controle!
i know wat u mean, u want to use the DDX. to ues DDX, not only should u add a variable, and use UpdateDate(TRUE), but also do somechang in the DoDataExchange(...) member function |
Recent GIDBlog
Observations of Iraq by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need help with Simple 1D Array coding project | rho | C++ Forum | 2 | 27-Jun-2005 19:05 |
| c programming : project idea ??? | batrsau | C++ Forum | 2 | 09-Jun-2005 04:55 |
| Community Project Proposal | dsmith | Miscellaneous Programming Forum | 71 | 19-Feb-2005 12:26 |
| GIMcontacts - a gim fltk fluid venture | cable_guy_67 | FLTK Forum | 0 | 14-Feb-2005 14:18 |
| Need help on simple Programming Project | daNichex6 | C Programming Language | 1 | 03-Sep-2004 18:08 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The