(CCing wine-devel again)
Dimi Paun wrote:
Problem is that DrawText() for the subitems will also use the background color - which is wrong.
Why is it wrong?
Because the "background color" isn't the background color of the list. And it's definitly not the text bkclr in gdi-context either - I hacked together an app to prove that:
http://flexo.popuserv.org/test.c
Now it seems getting rid of the OPAQUE completly is wrong, but for different reasons.
It seems to me that this is a bit of a problem:
3783 if (nSubItem == 0 || (cdmode & CDRF_NOTIFYITEMDRAW)) 3784 prepaint_setup(infoPtr, hdc, &nmlvcd); 3785 3786 /* in full row select, subitems, will just use main item's colors */ 3787 if (nSubItem && uView == LVS_REPORT && (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT)) 3788 nmlvcd.clrTextBk = CLR_NONE;
I guess the call to prepaint_setup should come _after_ the if with FULLROWSELECT, no?
Depends. Right now this code does nothing (and I was going to remove it anyway) - the only place where clrTextBk is read from is in prepaint_setup() - but prepaint_setup() is not called for subitems (and the CLR_NONE override is only done for subitems).
Also, I can't remember, but there was a reason why prepain_setup was called just for the main item, why did you changed that?
Because subitems can use different colors (see test app) and prepaint_setup() is where the colors are set up...
Note that I don't change the notifications being passed or anything of their context (with the exception of the GDI context in the postpaint notification - but the GDI context should be saved & restored in between anyway, see the failing test I commited a few days ago) so I can't imagine how this could break anything.
Felix