Solved

Reading Edit Box(editor)

Posted on 1999-01-25
6
245 Views
Last Modified: 2013-11-20
Could any one give me the code to read the line of text from  text editor into the declared string. I am using Visual C++ 4.0. I want the code to be in such a way that after reading the entire line from this text editor, The line counter will move to the next line. This editor is not much different from the one done with the application wizard. It is an MDI editor.
0
Comment
Question by:palapyean
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 

Author Comment

by:palapyean
ID: 1328280
Edited text of question
0
 

Author Comment

by:palapyean
ID: 1328281
Edited text of question
0
 
LVL 1

Accepted Solution

by:
dd_b earned 100 total points
ID: 1328282
hope you must be using multiline Edit control for writing text

step 1
:Edit.GetLineCount  : Get no of lines in multiline edit box

then in for loop

for all line
     // returns no of bytes at line no nLine
      int Edit.LineLength( int nLine  );
      // if not using CSting then allocate buffer of line size
     int edit.GetLine( int nLine, LPTSTR lpszBuffer );// get individual line
for next

All the best

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:dd_b
ID: 1328283
All this r the members of MFC use CEdit class if you are using CEditview then it is your base class object.

All the best
0
 

Author Comment

by:palapyean
ID: 1328284
dd_b,

Hi!! Thank you for your quick respond. I have tried your suggestion. I am really a new comer to the language ( I have been using PASCAL and VISUAL BASIC for my programmings) therefore I could not figure out how to resolve the errors that arised during compilation period. Is this how I should implement the code?

      CEDITORView:CEdit.GetLineCount(nLine, LPTSTR lpszBuffer);

If I do it like that this is the error s I got from that single line.

Compiling...
IDSSView.cpp
G:\Idss\EDITORView.cpp(142) : error C2143: syntax error : missing ';' before '.'
G:\Idss\EDITORView.cpp(142) : error C2143: syntax error : missing ';' before '.'
G:\Idss\EDITORView.cpp(143) : error C2143: syntax error : missing ';' before ':'
G:\Idss\EDITORView.cpp(143) : error C2143: syntax error : missing ';' before ':'
Error executing cl.exe.
IDSSView.obj - 4 error(s), 0 warning(s)

So is it possible that you can give me more direct code?

You may as well conactme directly at: palapyean@usa.net or through AOL insatant message (palapyean)

thanx

Palapyean
0
 

Author Comment

by:palapyean
ID: 1328285
dd_B has given only the relevent command which can be easily obtained from the on-line help he didnot give precisely what I wanted, even after giving him such long time.


0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 54
Show shut-down message as Windows 8 shuts down. 9 109
Hibernate methods 2 87
wordmultiple challenge 12 167
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question