http://bugs.winehq.org/show_bug.cgi?id=5311
------- Additional Comments From qingdao33122@yahoo.com 2006-10-06 04:51 ------- Created an attachment (id=2609) --> (http://bugs.winehq.org/attachment.cgi?id=2609&action=view) Bug compatibility patch
The initial value of iImage and iSelectedImage, which is -1, coincides with _IMAGECALLBACK. Normally it should be OK as we keep track of a callback mask for each treeview item. But intermixed with a bug in native comctl32 bad things can happen such as this one.
If an app never sets the iImage(or iSelectedImage), but queries for this value anyway with TreeView_GetItem, instead of failing the call, native implementation just sets the field to 0. This of course is buggy bevavior, but if we don't set iImage and iSelectedImage explicitly, zero initialization done in Alloc happens to take care of that.