S
sb
Is there anyway to speed up the selecting and coloring of text in a
richedit. The parsing of the text is nothing in comparison with how long it
takes these two calls to take place (over many lines):
rtb.Select(currentPos, myLine.Length);
rtb.SelectionColor = myColor;
From my research, there are a few ways to speed up the richedit but none of
them help speed up the coloring process:
1) Inherit from the RichEdit and in an overloaded WndProc, ignore WM_PAINTs
while updating
2) Use SendMessage to pause redraws/events (EM_SETEVENTMASK, SETREDRAW)while
updating
3) Hide the RichTextBox while updating (seems to work the best...but it is
still slow)
Does anyone else out there have any better suggestions? I want to color the
entire richeditbox in one sweep...so I don't have flickering or other
noticeable side-effects caused by scrolling. I'm not looking to use a 3rd
party control either for a number of reasons.
TIA!
sb
richedit. The parsing of the text is nothing in comparison with how long it
takes these two calls to take place (over many lines):
rtb.Select(currentPos, myLine.Length);
rtb.SelectionColor = myColor;
From my research, there are a few ways to speed up the richedit but none of
them help speed up the coloring process:
1) Inherit from the RichEdit and in an overloaded WndProc, ignore WM_PAINTs
while updating
2) Use SendMessage to pause redraws/events (EM_SETEVENTMASK, SETREDRAW)while
updating
3) Hide the RichTextBox while updating (seems to work the best...but it is
still slow)
Does anyone else out there have any better suggestions? I want to color the
entire richeditbox in one sweep...so I don't have flickering or other
noticeable side-effects caused by scrolling. I'm not looking to use a 3rd
party control either for a number of reasons.
TIA!
sb