flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
AsmGuru62 12 Nov 2024, 16:37
Are you using 32-bit code or 64-bit?
|
|||
![]() |
|
bitRAKE 12 Nov 2024, 16:38
[64-bit] If it is other than,
Code: mov eax, [r9 + NMTREEVIEW.hdr.code] * NM_TREEVIEW is old naming convention, but applies the same. [32-bit] The value of lParam is on the stack. Load it into a register and then the above applies - offset from register. Code: mov edx, [esp + 4*4] mov eax, [edx + NMTREEVIEW.hdr.code] |
|||
![]() |
|
Roman 13 Nov 2024, 09:02
https://rutube.ru/video/93213b5c66d4a6a108cd513803e8579b/
Code: macro Msg txt {invoke MessageBox,0,txt,0,0} tvi TV_ITEM treeHwnd dd 0 treeNumItems dd 0 Status rb 1024*20 GetTreeAllNames: invoke GetDlgItem,esi,1 ;mov esi,[hwnddlg] mov [treeHwnd],eax invoke SendMessage,eax,TVM_GETCOUNT,0,0 inc eax mov [treeNumItems],eax ;cinvoke sprintf,Status+1000,'%d',eax ;Msg Status+1000 mov [tvi.cChildren], 0 mov edi,Status mov [tvi.mask],TVIF_TEXT mov [tvi.cchTextMax], maxTxtLenn mov [tvi.pszText],edi invoke SendMessage,[treeHwnd],TVM_GETNEXTITEM,TVGN_ROOT,0 ;get first tree element .uu: mov [tvi.hItem],eax invoke SendMessage,[treeHwnd],TVM_GETITEMA, 0, tvi ;dec [treeNumItems] ;jz .ll Msg edi ;get childrns mov ebx, [tvi.hItem] .nnx: mov [tvi.mask],TVIF_TEXT+TVIF_CHILDREN invoke SendMessage,[treeHwnd],TVM_GETNEXTITEM,TVGN_CHILD,[tvi.hItem] mov [tvi.hItem],eax test eax,eax jz .done .10: invoke SendMessage,[treeHwnd],TVM_GETITEMA, 0, tvi dec [treeNumItems] jz .ll cmp [tvi.cChildren],1 jnz .oo Msg edi jmp .nnx .oo: push eax Msg edi mov word [edi],0 invoke SendMessage,[treeHwnd],TVM_GETNEXTITEM,TVGN_NEXT,[tvi.hItem] mov [tvi.hItem],eax pop eax test eax,eax jnz .10 .done: mov [tvi.mask],TVIF_TEXT mov [tvi.cChildren], 0 mov [tvi.hItem],ebx invoke SendMessage,[treeHwnd],TVM_GETNEXTITEM,TVGN_NEXT,[tvi.hItem] test eax,eax jnz .uu .ll: ret |
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.