Hi,
I am using visual studio 2008, C++ MFc. I have create 2 edit box. I will let user key in at the editbox1. Then i will get line and paste what user have key in to editbox2. I want it to be something like hyper terminal format. That mean when user key in "how r u" in editbox1 then press 'enter', the program should automatic get "how r u" (what the user key in) and paste/copy/send it to editbox2. Hope that someone can help me out with this. So far i can only get the line from editbox1 and paste it to editbox 2 with the help of button and with some errors.
In the button function:
UpdateData(TRUE);
int nCurrentLine = m_command.LineFromChar(-1);
int lineLen = m_command.LineLength(nCurrentLine);
LPTSTR p = m_strCommand.GetBuffer(lineLen+1);
m_command.GetLine(nCurrentLine, p);
m_strCommand.ReleaseBuffer(lineLen);
CString abc = m_strCommand;
SetDlgItemText(IDC_EDIT2, abc);
UpdateData(TRUE);