RICHEDIT once again
kfoltman at portal.onet.pl
Sun Jan 30 08:07:16 CST 2005
Mike McCormack wrote:
> 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.
I'd prefer to keep it as an app, not a DLL for a while. It just makes
> 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.
Sure. And I guess it should be done before making a DLL out of it.
> 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.
Good point. I guess it would be nice to replace malloc/free with
LocalAlloc/LocalFree, right ?
> Similarly, you'll need to use "winbase.h" and friends instead of
Good idea. Done.
> From what I can see in the old riched32 code, the rtf parser looks
> quite good, so don't try rewrite that
I'm all for reusing existing Wine code.
> 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.
LOL :) That's a smart idea :) I'm curious about interactions with undo,
but we have no undo anyway (yet).
> I have a test I can send to you if you wish.
You mean, another container application ? That would be cool, my
container is getting better but it's still not very good.
> Again, my preference is to get this into the Wine CVS sooner rather
> than later, so others can start helping improve it.
I'll see what can be done. As soon as there is a minimal text
manipulation API (based on RichEdit API, not on function calls), I can
separate the control into a DLL and move the app code in the test directory.
So far, the next version is available at:
Main changes are:
- editor.c contains a list of which messages/notifications/styles work
and which don't
- incomplete read-only mode
- replacement of MSVCRT wcs functions with Win32 lstr
- a modification flag
- a shy attempt at starting undo
- a #define to choose between my editor and the original RICHEDIT. It's
not what I want it to be, but it's better than nothing.
More information about the wine-devel