Is there a way to prevent updates from happening til I'm through? A
freeze() or something?
-dave
You can send the RichEdit control the WM_SETREDRAW message, to turn off screen
updating while you select the characters. Here's an example I posted a while
back...
8< - - - - -
//turn off screen updating
RichEdit1->Perform(WM_SETREDRAW, false, 0);
//do your selecting / changing...
//for example...
int start = RichEdit1->SelStart;
int end = start + RichEdit1->SelLength;
for (int index = start; index < end; index++)
{
RichEdit1->SelStart = index;
RichEdit1->SelLength = 1;
RichEdit1->SelAttributes->Style = RichEdit1->SelAttributes->Style << fsBold;
}
//turn on screen updating
RichEdit1->Perform(WM_SETREDRAW, true, 0);
//update display
RichEdit1->Refresh();
8< - - - - -
HTH.
/*---------------------------------*/
Damon Chandler
http://bcbcaq.freeservers.com
Answers to <Commonly Asked Questions>
> You can send the RichEdit control the WM_SETREDRAW message, to turn off
screen
> updating while you select the characters. Here's an example I posted a
while
> back...
Thanks, I'll give that a shot.
-dave
Dave <land...@ameritech.net> wrote in message
news:7jvema$ep...@forums.borland.com...
> I'm trying to write a syntax highlighting memo control out of a TRichEdit
> control. A problem I'm having is while highlighting a line, the line
> flickers. I'm using EM_HIDESELECTION to prevent the highlighting from
> showing, but it still flickers.
>
> Is there a way to prevent updates from happening til I'm through? A
> freeze() or something?
>
> -dave
>
>
>In addition to Damon's suggestion, you could also try the LockWindowUpdate
>API call.
Aaaaaaaahhhhh !! ;-)
Please go to http://www.deja.com/ and have a look at "Hoffmeister
LockWindowUpdate"...
--
Stefan Hoffmeister (TeamB) http://www.econos.de/
Please do apply judgement when sending email.