[Bug 5278] Edit control redraws its background incorrectly in 16-bit app

Wine Bugs wine-bugs at winehq.org
Wed Aug 9 16:29:25 CDT 2006


http://bugs.winehq.org/show_bug.cgi?id=5278





------- Additional Comments From hallo at michael-kaufmann.ch  2006-09-08 16:29 -------
I have found the problem: The edit box wants to know the background color and 
sends a WM_CTLCOLOR message to the parent window. The application doesn't 
return a brush handle, but some other value. This is a bug in the application.

This is the code how it was before my patch:
  SelectObject(dc, brush);
  Rectangle(dc, rc.left, rc.top, rc.right, rc.bottom);

The SelectObject() will fail, because the brush is invalid. But there will 
still be an old brush selected in the DC, and this brush is used to paint the 
background.


The new code:
   FillRect(dc, &rc, brush);

Now the whole fill function fails because the brush is invalid.


So this is an application bug. I'll try to create a patch that makes Wine look 
better in this case.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list