editbox to listbox problem...
-
what is the exact code to get the value of the editbox (variable type double) and displays in the listbox? i tried : m_list.GetText(m_list.GetCurSel(), m_edit1) and m_list.GetText(m_edit1) but after building committed errors... please help.
-
what is the exact code to get the value of the editbox (variable type double) and displays in the listbox? i tried : m_list.GetText(m_list.GetCurSel(), m_edit1) and m_list.GetText(m_edit1) but after building committed errors... please help.
Neil Jigger wrote:
what is the exact code to get the value of the editbox (variable type double) and displays in the listbox?
CString str;
m_edit.GetWindowText(str);
m_listbox.AddString(str);"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Neil Jigger wrote:
what is the exact code to get the value of the editbox (variable type double) and displays in the listbox?
CString str;
m_edit.GetWindowText(str);
m_listbox.AddString(str);"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
--------------------Configuration: g - Win32 Debug-------------------- Compiling... gDlg.cpp C:\Program Files\Microsoft Visual Studio\MyProjects\g\gDlg.cpp(179) : error C2039: 'GetWindowTextA' : is not a member of 'CString' c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString' Error executing cl.exe. g.exe - 1 error(s), 0 warning(s) still i cannot get the right code...
-
--------------------Configuration: g - Win32 Debug-------------------- Compiling... gDlg.cpp C:\Program Files\Microsoft Visual Studio\MyProjects\g\gDlg.cpp(179) : error C2039: 'GetWindowTextA' : is not a member of 'CString' c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString' Error executing cl.exe. g.exe - 1 error(s), 0 warning(s) still i cannot get the right code...
Yes.. SetWindowText is not a member of CString. I assume you are using a textbox. make a variable of control type. Something like this
CEdit m_edit
and then compile the code.Hope this helps.