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 26-Jan-2005, 23:28
aie0 aie0 is offline
Member
 
Join Date: Dec 2004
Posts: 246
aie0 is a jewel in the roughaie0 is a jewel in the rough

CEdit line retrieval


I need to get the string from one lined CEdit contol ( the usual one)

I've always been using the dodataexchange function but this time I can't use it
I've tried GetLine(0,buffer) function but is seems doesn't retrieve a thing
  #2  
Old 27-Jan-2005, 10:25
amad1337's Avatar
amad1337 amad1337 is offline
Junior Member
 
Join Date: Dec 2004
Posts: 54
amad1337 will become famous soon enough
Quote:
Originally Posted by aie0
I need to get the string from one lined CEdit contol ( the usual one)

I've always been using the dodataexchange function but this time I can't use it
I've tried GetLine(0,buffer) function but is seems doesn't retrieve a thing


Why don't you use...

CPP / C++ / C Code:

CString strLocal;

UpdateData(TRUE);

strLocal.Format("s%", m_strEdit1);

Ihope this helps
  #3  
Old 27-Jan-2005, 14:22
aie0 aie0 is offline
Member
 
Join Date: Dec 2004
Posts: 246
aie0 is a jewel in the roughaie0 is a jewel in the rough
cause updatedata calls dodataexchange i don't have such a function
But turned out it was my mistake
I forgot to write the object next to the function thus compiler was referring to the wrong class, so it wasn't really a mistake but misunderstanding between me and VS :-)
  #4  
Old 29-Jan-2005, 05:59
davidgilmour davidgilmour is offline
New Member
 
Join Date: Jan 2005
Posts: 6
davidgilmour is on a distinguished road
Use

CString strEditText;
GetDlgItemText(IDC_EDIT1,strEditText);

replace IDC_EDIT1 with whatever your Edit control ID is
  #5  
Old 31-Jan-2005, 00:20
Max Payne's Avatar
Max Payne Max Payne is offline
Regular Member
 
Join Date: Apr 2004
Location: 3° 08 North 101° 42 East
Posts: 332
Max Payne is a jewel in the roughMax Payne is a jewel in the roughMax Payne is a jewel in the rough
Another way would be...

CPP / C++ / C Code:
CEdit* m_Edit = (CEdit*)GetDlgItem(IDC_EDIT);

m_Edit->GetLine( 0, buf );

but the data exchange would be th cleanest way to do this..
__________________
When you say "I wrote a program that crashed Windows," people just stare at you blankly and say "Hey, I got those with the system, for free." Linus Torvalds
 
 

Recent GIDBlogUS Elections and the ?Voter?s Responsibility? 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
CD Burner Help - Power Calibration Error.... JonBoy420 Computer Hardware Forum 110 05-Feb-2008 19:34
burning problems PLEASE PLEASE HELP kelticeire Computer Hardware Forum 4 01-Dec-2006 16:39
CD burner wont burn!! robertli55 Computer Hardware Forum 1 18-Jun-2004 11:53
Yet another CD burner problem: Lite-On LSC-24082K Erwin Computer Hardware Forum 1 22-May-2004 12:28
CD Buring Failed skanth2000 Computer Hardware Forum 1 15-Nov-2003 04:52

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

All times are GMT -6. The time now is 08:04.


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