Solved

Reading Edit Box(editor)

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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

635 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