Solved

Reading Edit Box(editor)

Posted on 1999-01-25
6
239 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now