RICHEDIT once again

Mike McCormack mike at codeweavers.com
Sun Jan 30 06:41:21 CST 2005


Krzysztof Foltman wrote:
> My rich text control is still far from even semi-complete, but I think 
> too much is done to start over, so I'm releasing it today. The number 
> one reason of its incompleteness is that I put more emphasis on making 
> things work exactly like in the original than on implementing more 
> functions.

Fantastic.  This is good work.  I haven't reviewed the code in depth, 
but I think the way forward is to submit an implementation of 
dlls/riched20 then make that work, and after it's debugged and worked 
out, rip out the old dlls/riched32 code and forward it to the new 
completed riched20 code.

Code review notes:

You've writen the code to deal with unicode as default, which is good, 
but you need to deal with both ASCII and unicode messages in the window 
procedure.

It might be better to use libwineunicode and kernel32 unicode string 
manipulation functions rather than msvcrt ones. eg lstrlenW, lstrcpyW, 
etc. instead of wcslen, wcscpy, etc. Avoid the TCHAR type in Wine code.

Similarly, you'll need to use "winbase.h" and friends instead of 
"windows.h".

 From what I can see in the old riched32 code, the rtf parser looks 
quite good, so don't try rewrite that (which from my quick check you 
haven't).  We can merge the parser into the riched20 code quite 
easily... it's just  enters the text into the existing control using 
EM_SETSEL and some formatting messages.

I have a test I can send to you if you wish.  Again, my preference is to 
get this into the Wine CVS sooner rather than later, so others can start 
helping improve it.

Mike



More information about the wine-devel mailing list