Treeview_SelectItem shouldn't bail out if reselecting the same item.

Crestez Leonard cleonard at go.ro
Thu Jan 6 18:40:14 CST 2005


The treeview implementation skipped Treeview_SelectItem if selecting the
same item again.

msdn says the following:

When you call the TreeView_SelectItem macro, the control's parent window
receives the TVN_SELCHANGING and TVN_SELCHANGED notification messages.
Also, if the specified item is the child of a collapsed parent item, the
parent's list of child items is expanded to reveal the specified item.
In this case, the parent window receives the TVN_ITEMEXPANDING and
TVN_ITEMEXPANDED notification messages. 
        
Using the TreeView_SelectItem macro is equivalent to sending the
TVM_SELECTITEM message with its flag parameter set to the TVGN_CARET
value.

Source:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/treeview/macros/treeview_selectitem.asp

There is no mention of not sending the message if selecting the same
item again. I also tested native comctl32.dll, and it does send
TVN_SELCHANGING and TVN_SELCHANGED.

I assume that it was an optimisation of sorts, but it's incorrect.

Changelog:
	Fix bug with Treeview_SelectItem reselecting the same item
-- 
Crestez Leonard <cleonard at go.ro>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: treeview.diff
Type: text/x-patch
Size: 539 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050107/7f8b9e7f/treeview.bin


More information about the wine-patches mailing list