[2/3] comctl32: Never draw item text with OPAQUE.

Felix Nawothnig flexo at holycrap.org
Fri Mar 16 11:58:27 CDT 2007

Dimi Paun wrote:
> But this ends up creating and deleting the brush for each of the cells

Well - yes. But other controls do this too (statusbar for example) and 
considering all the stuff we do during refresh this is hardly a 
bottleneck. And even if it is we should optimize this codepath in gdi32 
instead (by caching solid brushs for example).

> we draw... I'm not sure I understand why using OPAQUE here doesn't work.

Problem is that DrawText() for the subitems will also use the 
background color - which is wrong. To fix this while still using OPAQUE 
we'd need to do something like:


But abusing TextOutW() like that just seems wrong to me.

Using DrawText() to draw the background won't work either due to 
LVS_EX_FULLROWSELECT (well, I guess we *could* do it by DrawText()ing 
the first item over the full row and the subitems on top of it but I'd 
prefer to _simplify_ the code, not add more hacks).


More information about the wine-devel mailing list