LISTVIEW_SetItemState problem in FlashFXP (and other applications)

Rolf Kalbermatter rolf.kalbermatter at
Sun Apr 10 14:06:37 CDT 2005

I was just discussing the problem with FlashFXP on Wine and did some
Google search on this.
It turned out that back in 2003 this problem was already noticed by one
of the developers
of FlashFXP and also somehow documented as follows: 

>  1. FlashFXP is no longer compatible with WINE, Switching to the
>    listview has broken compatiblity, it's unlikely that WINE will be
>    WINE needs to be made more compatible with FlashFXP.
> |- After reviewing the wine source code I believe the problem is
located here
> line 2971
& 2972
>    2971     for (i = nFirst; i <= nLast; i++)
>    2972         LISTVIEW_SetItemState(infoPtr,i,&item);
>    The Problem: In OwnerData mode the OnData event is triggered when
>    ItemState changes. However in the OnData event we set the item
>    I suspect this causes an infinite loop.
This probably is very close to the actual problem. Looking at current
in CVS I see following at about this location:
> 2979     /* FIXME: this is not correct LVS_OWNERDATA
> 2980      * setting the item states individually will generate
> 2981      * a LVN_ITEMCHANGED notification for each one. Instead,
> 2982      * we have to send a LVN_ODSTATECHANGED notification.
> 2983      * See MSDN documentation for LVN_ITEMCHANGED.
> 2984      */
> 2985     for (i = nFirst; i <= nLast; i++)
> 2986         LISTVIEW_SetItemState(infoPtr,i,&item);

Of course there are people here much more familiar with Common Controls
than me, so
I will probably not be able to do a quick fix to this myself. Just
thought I would
point out my findings so that others can confirm or reject the probable
cause of the
endless loop in FlashFXP and other applications.

Rolf Kalbermatter

More information about the wine-devel mailing list