https://bugs.winehq.org/show_bug.cgi?id=39730
--- Comment #11 from Nikolay Sivov bunglehead@gmail.com --- (In reply to Dmitry Timoshkov from comment #10)
(In reply to Nikolay Sivov from comment #9)
Maybe it will occasionally work, but it's not a solution, because GetClassInfo() returns original brush handle.
Does the application depend on this?
This one probably not, but it's obviously a wrong way for the reasons I named.
And manually created 32bit brush handle truncated to 16bit, and then passed again through FillRect16 -> FillRect will break in same way, when LOWORD is low enough.
You said that FillRect16 is not involved at all? If it actually is, then a possible solution was already suggested.
Like I said it's irrelevant to this particular application as FillRect16 is not used. This sample comes with sources if you're interested.