I am using a linked list to store all line data of my edit control.
Now i am facing this problem with the wm_paint msg-
To paint the window i have to iterate through the whole list to get the data of the topline through which i start painting. Now in a big file this iteration can really slow down the editor.
So how do i get rid of this problem?
What should i do? Is it that this whole approach is wrong and i should use some other abstraction? if yes, which one?
Posted on 2001-08-17 04:14:53 by MovingFulcrum
On my edit control, I store the topline in a var, so that I always know where to start drawing.
This var is updating on scrolling, moving, etc...

Just an idea... Tell me if it's not a good one !

(s)
Posted on 2001-08-17 04:40:18 by (scalp)
i had thought of that first but then as these C pointer confuse the hell outts me i somehow got the notion that i would have to store the entire list 2 times. but f0dder just cleared my doubts on icq.
Thanks for replying anyway:)
btw, how far have you reached with your edit control, (scalp).
Posted on 2001-08-17 04:53:04 by MovingFulcrum
For the moment, it can display asm text with some syntax highlighting (comment and string). When you type "displaylable" char, it update the buffer.
It also do horizontal scroll if the line is too big.
For the moment, no caret, no moving...

(s)
Posted on 2001-08-17 07:45:26 by (scalp)
umm..... What do u use to search for keywords for syntax highlighting? A binary tree or something?
Posted on 2001-08-17 19:46:00 by MovingFulcrum
for the moment, it only display string in green and comment in blue.
I don't search for keyword yet... i have some other thing to think of (like using the mouse, moving the caret left/right...)


(s)
Posted on 2001-08-18 03:29:36 by (scalp)