I tested in windows xp, and found that the treeview control ignores the stateMask field when getting item data. This fixes a bug in the NSIS installer as well. ChangeLog: TREEVIEW_GetItemA should ignore stateMask, as Windows does thanks -mike
--- dlls/comctl32/treeview.c.old 2003-03-25 12:21:12.000000000 +0000 +++ dlls/comctl32/treeview.c 2003-03-25 15:49:50.000000000 +0000 @@ -2016,8 +2016,12 @@ if (tvItem->mask & TVIF_SELECTEDIMAGE) tvItem->iSelectedImage = wineItem->iSelectedImage; - if (tvItem->mask & TVIF_STATE) - tvItem->state = wineItem->state & tvItem->stateMask; + if (tvItem->mask & TVIF_STATE) { + /* Careful here - Windows ignores the stateMask when you get the state + That contradicts the documentation, but makes more common sense, masking + retrieval in this way seems overkill */ + tvItem->state = wineItem->state; + } if (tvItem->mask & TVIF_TEXT) lstrcpynA(tvItem->pszText, wineItem->pszText, tvItem->cchTextMax);