Rich Text Box 
Author Message
 Rich Text Box

I have a RichText document that I need to look at the first 4 characters of
each line.  If they meet a condition I need to copy them to another
document.

Are they a way to get the starting position and width of a line??

Thanks in advance for any help.

Phil



Fri, 21 Sep 2001 03:00:00 GMT  
 Rich Text Box

The RTB supports the EM_GETLINE message, so you could do something like:

Dim strBuffer As String
Dim lReturn as Long

StrBuffer = String$(255, vbNullChar)

lReturn = SendMessage(rtf.hWnd, EM_GETLINE, LineNumber, ByVal strBuffer)

if lReturn Then _
        strBuffer = Left$(strBuffer, lReturn)

strBuffer will contain the text in the zero-based index line number of the
texbox.

~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please post/reply to the newsgroup(s) so
that everyone can benefit from the discussion.

Regards,

Klaus H. Probst, MCP

       ICQ: 22454937
      The VB Box: http://members.xoom.com/kprobst/
~~~~~~~~~~~~~~~~~~~~~~~~~~~



Quote:
> I have a RichText document that I need to look at the first 4 characters
of
> each line.  If they meet a condition I need to copy them to another
> document.

> Are they a way to get the starting position and width of a line??

> Thanks in advance for any help.

> Phil




Fri, 21 Sep 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Colour Text Box/Class Wrapper for Rich Text Box

2. Newbie question: Rich Text Box vs. Text Box

3. help: formatting rich text box/text box

4. Rich Text Box vs. Text Box Scrolling

5. Rich Text Box or text box control

6. Looking for APIs for text box and Rich text box

7. Becoming rich with a rich text box

8. Rich Text Box: Can I remove text and keep multicolored text

9. Printing a box in a rich text box

10. Resizing a Rich Text Box and a List Box

11. Help in understanding drag drop from a list box to a rich text box

12. Rich Text Box / Word box etc that displays tables etc

 

 
Powered by phpBB® Forum Software