http://bugs.winehq.org/show_bug.cgi?id=23077
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com 2010-06-09 12:26:44 --- What is does is another TVM_GETITEMA on TVN_ITEMEXPANDING notification, so a possible reason is that we don't set item state at some point when it's expected to be set:
--- trace:treeview:TREEVIEW_Toggle trace:treeview:TREEVIEW_Collapse TVE_COLLAPSE 0x178360 L"Program Files" trace:treeview:TREEVIEW_SendTreeviewNotify code:-454 action:1 olditem:(nil) newitem:0x178360 002d:Call user32.GetWindowLongW(0002011e,fffffff4) ret=7e493f47 002d:Ret user32.GetWindowLongW() retval=000003ed ret=7e493f47 trace:treeview:TREEVIEW_SendRealNotify wParam=1005, lParam=17163844 002d:Call user32.SendMessageW(00010104,0000004e,000003ed,0105e644) ret=7e494021 002d:Call hook proc 0x497e20 (id=WH_CALLWNDPROC,code=0,wp=00000001,lp=0105e4cc) 002d:Call user32.CallNextHookEx(000300a0,00000000,00000001,0105e4cc) ret=00497ee9 002d:Ret user32.CallNextHookEx() retval=00000000 ret=00497ee9 002d:Ret hook proc 0x497e20 (id=WH_CALLWNDPROC,code=0,wp=00000001,lp=0105e4cc) retval=00000000 002d:Call window proc 0x8ef17a (hwnd=0x10104,msg=WM_NOTIFY,wp=000003ed,lp=0105e644) ... 002d:Call user32.SendMessageA(0002011e,0000110c,00000000,0105da80) ret=008f8855 002d:Call hook proc 0x497e20 (id=WH_CALLWNDPROC,code=0,wp=00000001,lp=0105d92c) 002d:Call user32.CallNextHookEx(000300a0,00000000,00000001,0105d92c) ret=00497ee9 002d:Ret user32.CallNextHookEx() retval=00000000 ret=00497ee9 002d:Ret hook proc 0x497e20 (id=WH_CALLWNDPROC,code=0,wp=00000001,lp=0105d92c) retval=00000000 002d:Call window proc 0x8ef17a (hwnd=0x2011e,msg=TVM_GETITEMA,wp=00000000,lp=0105da80) ... 002d:Ret user32.SendMessageW() retval=00000000 ret=7e494021 ---
I'll test it.