Initialize listview item size.
Duane Clark
dclark at akamail.com
Mon Feb 3 11:33:30 CST 2003
Dimitrie O. Paun wrote:
> On Mon, 3 Feb 2003, Duane Clark wrote:
>
>
>>This is a separate bug from the other listview patches. If an app sends
>>a LISTVIEW_Paint to a new listview before adding any items (which an app
>>was :-) the item size was not getting set, causing subsequent
>>LISTVIEW_Paint calls to clip the painting.
>
>
> Sorry Duane, maybe it's just Monday morning, but I don't understand this.
> If the listview has no items, what is it supposed to paint?
It paints the headers. And the problem comes about because in
LISTVIEW_Paint, a test is made for the first paint, and if it is the
first paint, the item size is updated.
if (infoPtr->bFirstPaint)
{
UINT uView = infoPtr->dwStyle & LVS_TYPEMASK;
infoPtr->bFirstPaint = FALSE;
LISTVIEW_UpdateItemSize(infoPtr);
...
>
> Also, this just doesn't seem like the right place to place this check.
> What if the app doesn't call LVM_SETITEMCOUNT?
>
It has nothing to do with LVM_SETITEMCOUNT that I know, or am I missing
something? This bug is not related to the other bug.
More information about the wine-devel
mailing list