Edit Box
-
I want to use it as a server display . Which will display many things like IP etc. and it will go on displaying data as it reaches server. How do I update my attached m_strEdit variable to show many things without deleting the previous received data at Edit box. Rahul
-
I want to use it as a server display . Which will display many things like IP etc. and it will go on displaying data as it reaches server. How do I update my attached m_strEdit variable to show many things without deleting the previous received data at Edit box. Rahul
-
suppose your m_strEdit is an Edit control of type CString then for updating the same with new data CString NewData = "a" m_strEdit += NewData
You can assign a string type variable to it and then use it to set/reset the contents back. You can always take the text from the edit box, attach some more characters to it and then replace the text but that would be a length procedure...
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
I want to use it as a server display . Which will display many things like IP etc. and it will go on displaying data as it reaches server. How do I update my attached m_strEdit variable to show many things without deleting the previous received data at Edit box. Rahul
Like:
CString strText;
m_edit.GetWindowText(strText);
strText += "More data...";
m_edit.SetWindowText(strText);Another option is to move the insertion point to the end using
SetSel()
, and then replace what's there (which is nothing) usingReplaceSel()
. Try 'em both to see which you prefer.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
You can assign a string type variable to it and then use it to set/reset the contents back. You can always take the text from the edit box, attach some more characters to it and then replace the text but that would be a length procedure...
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_