Solved

Reading Edit Box(editor)

Posted on 1999-01-25
6
246 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
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!

 
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

734 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