I'm writing a syntax highliter and I've found that if I change the Font (WM_SETFONT) and SelectObject() while the WM_PAINT I got horrible results because the code is redrawing ALWAYS all the window and not only the UpdateRegion.

Am I right??

I've changed the EM_GETRECT for a GetUpdateRect() BEFORE the CallWindowProc() and now it works perfectly.

What do you think about it?

:alright:
Posted on 2004-01-02 04:03:39 by Eternal Idol Birmingham
I think most of us shy away from rich edit after seeing all that scary looking code...lol
Posted on 2004-01-02 19:54:36 by mrgone

I think most of us shy away from rich edit after seeing all that scary looking code...lol


Hehehe, it's a lot code but a kind of simple one in the HIGHLITE part, the hardest part is checking the words to highlite.
The highliter just asks for the position of the letter where it want to start writing a does a DrawText() right there, there's (in my opinion) a bug, because in the tutorial Iczelion tooks the whole rect of the control and not only the Update Rect.

Thanks for answering,
regards,
Mariano.

:alright:
Posted on 2004-01-03 04:16:57 by Eternal Idol Birmingham
Nothing to say about this?

:(
Posted on 2004-01-09 05:39:34 by Eternal Idol Birmingham