Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Reading Edit Box(editor)

Posted on 1999-01-25
6
Medium Priority
?
261 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
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

877 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