wine/dlls/comctl32 listview.c

Maxime Bellengé maxime.bellenge at laposte.net
Thu May 8 12:50:11 CDT 2003


I think I've found the problem, it comes from the fact that we don't
send the customdraw notify messages properly.

the correct sequence is in report mode:
1 - CDDS_PREPAINT
2 - CDDS_ITEMPREPAINT for each row if 1 contains CDRF_NOTIFYITEMDRAW
	- if the returned value is CDRF_NEWFONT, the color and font 	  values
are valid for all the subitems (ie : columns)
	- if the return value is CDRF_NOTIFYSUBITEMDRAW, we must send 	  the
CDDS_SUBITEM | CDDS_PREPAINT before drawing each column.
3 - CDDS_ITEMPOSTPAINT  if the returned value for the above call
	contains CDRF_NOTIFYPOSTPAINT
4 - CDDS_POSTPAINT if 1 returned CDRF_NOTIFYPOSTPAINT

Here is what is done in wine

1 - CDDS_PREPAINT
2 - CDDS_ITEMPREPAINT for each row and subitems(columns) if the returned
	value from 1 contains 	CDRF_NOTIFYITEMDRAW
3 - CDDS_ITEMPOSTPAINT if the returned value for the above call
	contains CDRF_NOTIFYPOSTPAINT
4 - CDDS_POSTPAINT if 1 returned CDRF_NOTIFYPOSTPAINT

I think it is why the colors in the subitems are not correct. I think
newsbin returns CDRF_NEWFONT so we must not send CDDS_NOTIFYITEMDRAW for
subitems (we should never send that, it is wrong). For each subitems we
send CDDS_NOTIFYITEMDRAW so the colors are set wrong by newsbin I think

To fix that we should change LISTVIEW_RefreshReport to send
CDDS_NOTIFYITEMDRAW if needed and we should change LISTVIEW_DrawItem to
send CDDS_NOTIFYSUBITEMDRAW if needed otherwise set the colors/font for
all the subitems of a row.

Dimitrie, what do you think of my idea ?

a+

Max


On Thu, 2003-05-08 at 17:22, Dimitrie O. Paun wrote:
> On Thu, 8 May 2003, Rein Klazes wrote:
> 
> > The first line is corrected (behaves as the following lines). But the
> > second and following columns still lack the proper text background
> > colour.
> 
> Excellent! This is what I wanted to hear. In fact, I would have
> been very worried if all problems would have been solved, because
> (as I was saying) we weren't setting CDDS_SUBITEM flag before,
> so why would have that fixed anything?
-- 
Maxime Bellengé <maxime.bellenge at laposte.net>




More information about the wine-devel mailing list