GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 31-Aug-2009, 00:30
nicholasamh nicholasamh is offline
New Member
 
Join Date: Aug 2009
Posts: 1
nicholasamh is on a distinguished road

Help for C++ MFC editbox


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:
CPP / C++ / C Code:
             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);
Last edited by LuciWiz : 31-Aug-2009 at 01:43. Reason: Please insert your C++ code between [cpp] & [/cpp] tags
 
 

Recent GIDBlogOnce again, no time for hobbies by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EditBox anandji05 MS Visual C++ / MFC Forum 0 28-Aug-2007 07:56
editbox output problem FireFox8173 MS Visual C++ / MFC Forum 1 01-Apr-2005 15:15
multiline editbox. ib_alam MS Visual C++ / MFC Forum 1 28-Mar-2005 21:17
displaying Dash(-) at specific location in editbox ib_alam MS Visual C++ / MFC Forum 0 10-Mar-2005 04:33
reading from comm port and displaing in editbox using MFc ib_alam MS Visual C++ / MFC Forum 9 02-Feb-2005 19:57

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 03:10.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.