http://bugs.winehq.org/show_bug.cgi?id=9795
--- Comment #11 from Pavel rawlik@list.ru 2010-06-22 09:41:03 --- Created an attachment (id=29067) --> (http://bugs.winehq.org/attachment.cgi?id=29067) reversed native comctl32.dll (maybe undocumented) behavior
native comctl32 send WM_DRAWITEM message to tab childs with pointer to a DRAWITEMSTRUCT in lParam
if TAB->cbInfo value <= 4 the pointer to value stored by CB_SETITEMDATA it's replased by Value.
ASSM code:
native comctl32.dll
5D5DF475 |. 837B 30 04 CMP DWORD PTR DS:[EBX+30],4 ;If [EBX+30] <= 4 // [EBX+30] <-> tab->CbInfo (OFFSET 0x30)
5D5DF479 |. 8B45 10 MOV EAX,DWORD PTR SS:[EBP+10] ;
5D5DF47C |. 77 05 JA SHORT COMCTL32.5D5DF483 ;
5D5DF47E |. 8B40 38 MOV EAX,DWORD PTR DS:[EAX+38] ; var = (DWORD *)TabItem->extra //( extra OFFSET 0x38)
5D5DF481 |. EB 03 JMP SHORT COMCTL32.5D5DF486 ;else
5D5DF483 |> 83C0 38 ADD EAX,38 ; var = TabItem->extra // ( extra OFFSET 0x38)
5D5DF486 |> 8945 DC MOV DWORD PTR SS:[EBP-24],EAX ; itemData = var;
5D5DF489 |. 8D45 B0 LEA EAX,DWORD PTR SS:[EBP-50]
5D5DF48C |. 50 PUSH EAX ; /lParam
5D5DF48D |. FF75 1C PUSH DWORD PTR SS:[EBP+1C] ; |wParam
5D5DF490 |. 6A 2B PUSH 2B ; |Message = WM_DRAWITEM
5D5DF492 |. FF73 04 PUSH DWORD PTR DS:[EBX+4] ; |hWnd
5D5DF495 |. FF15 CC135B5D CALL DWORD PTR DS:[<&USER32.SendMessageW>] ; \SendMessageW