Re: Converting text to Rich Text Format
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Sat, 09 Sep 2006 18:59:21 -0400
OK, the details are
Version 5.30.12.1211 8/29/2002 6:40am shows the error based on a misinterpretation of CRLF
sequences
Version 5.30.12.1221 8/4/2004 3:56am does not have the error
The timestamps are those reported by the "Show Modules" debug WIndow in VS.NET 2003.
So it apparently matters which version of DLL you are using. I'm going to have to put a
test in to make sure that I do the right compensation. I have to check to see if Riched20
is redistributable. My recollection was that it wasn't.
joe
On Sat, 09 Sep 2006 15:52:20 -0400, Joseph M. Newcomer <newcomer@xxxxxxxxxxxx> wrote:
What is really strange is that on my laptop I *don't* get the creep. I was just outJoseph M. Newcomer [MVP]
somewhere where my role had been to provide transportation, but I had nothing to do. I
noticed the "inverse creep". I will compare control DLL versions and report back when I
have my laptop up again.
I suspected that, but when I replaced \r\n with just \n, the text looks the same (unlike
an ordinary CEdit) but the count is still wrong.
joe
On Sat, 09 Sep 2006 00:19:11 -0700, "Mihai N." <nmihai_year_2000@xxxxxxxxx> wrote:
Joseph M. Newcomer [MVP]There is a "creep" where the SetSelection selects the wrong text depending
on how many
lines precede the text. No, I don't know what is wrong here, and there
appears to be no
documentation about the problem, but I noticed that the colors were slowly
moving to the right.
I'm not sure this will work correctly in the presence of line wrap, but all
my output fits on one line at the moment.
Some time ago I have noticed that a "\r\n" (0d 0a) in the original string
ends up counted as one character in the RTF (probably the \par).
So:
rtfControl.AddString( "a\r\n" );
rtfControl.AddString( "b\r\n" );
rtfControl.AddString( "c\r\n" );
means a#b#c# (# = "paragraph character", whatever that is in the belly of the
rtf control.) So trying to select the first line (length 3, in the original
text) will end up selecting a#b
And the more lines you have, the worse it gets :-)
I am not sure if this is your case, but I though it is worth mentioning.
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: Converting text to Rich Text Format
- From: Joseph M . Newcomer
- Re: Converting text to Rich Text Format
- From: Joseph M . Newcomer
- Re: Converting text to Rich Text Format
- References:
- Converting text to Rich Text Format
- From: Peter Olcott
- Re: Converting text to Rich Text Format
- From: Joseph M . Newcomer
- Re: Converting text to Rich Text Format
- From: Peter Olcott
- Re: Converting text to Rich Text Format
- From: Joseph M . Newcomer
- Re: Converting text to Rich Text Format
- From: Peter Olcott
- Re: Converting text to Rich Text Format
- From: Joseph M . Newcomer
- Re: Converting text to Rich Text Format
- From: Peter Olcott
- Re: Converting text to Rich Text Format
- From: Joseph M . Newcomer
- Re: Converting text to Rich Text Format
- From: Mihai N.
- Re: Converting text to Rich Text Format
- From: Joseph M . Newcomer
- Converting text to Rich Text Format
- Prev by Date: Re: CEdit problem
- Next by Date: Re: Simple Question for CAboutDlg
- Previous by thread: Re: Converting text to Rich Text Format
- Next by thread: Re: Converting text to Rich Text Format
- Index(es):
Relevant Pages
|