on knowing when to retreat...
Unfortunately adding code to unwrap lines pushes the performance of the keyword highlighting just beyond acceptable limits. So I turned off wrapping by adding the horizontal scrollbar styles.
Announcement
Collapse
No announcement yet.
Richedit wordwrap/linewrap question
Collapse
X
-
Problem solved - I was using %EM_LINELENGTH to get the length of each selected line. It doesn't include the line terminating characters! So a wrapped line (no line terminating chars) looks just like a non-wrapped line (with <CR><LF>). Onwards and upwards.
Leave a comment:
-
-
Brent, thanks, that method would probably work if you were exporting all of the text, but not if you are just pulling out a line, unfortunately.
Leave a comment:
-
-
Originally posted by Cliff Nichols View PostChris,
Do you mean a Richedit that the text changes and you update to show the new characters (or character) as it is typed?
Leave a comment:
-
-
Chris,
Do you mean a Richedit that the text changes and you update to show the new characters (or character) as it is typed?
Leave a comment:
-
-
Once you have determined the line you may consider looking 'backwards' using:
EM_EXLINEFROMCHAR
??
I am sure there is a faster way.. i am to lazy today..
Leave a comment:
-
-
Richedit wordwrap/linewrap question
I'm looking for a way of detecting whether a given line in a richedit control has been wrapped, or is the result of wrapping. I had high hopes of both EM_FMTLINES and EM_*WORDBREAKPROC but neither appears to do the necessary. The alternative is to maintain an external buffer containing the text being edited, but that would have to be kept up to date with WM_GETTEXT ( in order to get the "soft" line feeds), which would slow the whole plot to a crawl. I hope I'm missing something obvious?Tags: None
-
Leave a comment: