RICHED20: additional tests plus RFC

Alexander Nicolaysen Sørnes alex at
Sun Sep 16 09:00:12 CDT 2007

On Sunday 16. September 2007 04:34:17 a_villacis at wrote:
> I am tracking down a richedit bug in FACETS (bug #1713).
> Apparently, the OCX control used by this app expects a particular
> SendMessage()
> with the message EM_SETCHARFORMAT to return 1. Currently builtin returns 0
> unconditionally, making this app bail out with "Invalid property value". By
> changing the return value to 1 unconditionally, the app gets "fixed", but
> this
> is not a proper solution, since other apps might break with this change.
> This patch adds additional testing of EM_SETCHARFORMAT. All todo_wine's
> succeed
> in an installation of WinXP SP2. Please confirm this is so for all of you.
> There are two code blocks commented out. The first one makes the app crash
> on WinXP, and is listed for completeness. The other one was supposed to
> test what
> happens when the riched20 control receives a blanked-out CHARFORMAT2
> structure.
> However this triggers an assertion in Wine at style.c line 63. WinXP
> doesn't bat an eye, and possibly ignores these structure values. Unless
> somebody objects, I will shortly send a patch that replaces the assertion
> with a NULL return in style.c, plus a NULL check in editor.c .
> There are more riched20 tests that fail in WinXP SP2, unrelated to
> EM_SETCHARFORMAT, but I would like confirmation that (1) somebody else sees
> failing tests in native Windows, not just me, and (2) this patch does not
> introduce any new failing tests in native Windows.
> Changelog:
> * Add additional tests for EM_SETCHARFORMAT message of riched20 control

Hey, great to see some work on EM_SETCHARFORMAT.  If you're interested, Wine 
has a builtin WordPad (just type 'wine wordpad') which exposes some problems. 
Try to select a font in the font list when no text is selected, for instance.

Alexander N. Sørnes

More information about the wine-devel mailing list