
Extremely Active Member
     
Group: Moderators
Posts: 874
Member No.: 5019
Joined: 13-May 07

|
Hi
I coding a new Toy now have i a question
I call many in my code a one function with a different struct, can i make a procedure for it?
example:
invoke GetDlgItem,hWnd,1001 invoke SendMessage,eax,CB_GETCURSEL,0,0 mov eax,[Sample+eax*4] mov [ESI].CONFIG.format.LHV1.dwSample1,eax
invoke GetDlgItem,hWnd,1002 invoke SendMessage,eax,CB_GETCURSEL,0,0 mov eax,[Sample2+eax*4] mov [ESI].CONFIG.format.LHV1.dwSample2,eax
my goal is write for it a routine:
fillStruct proc hWnd:Dword,ResId:DWORD,Struct1:DWORD,Struct2:DWORD
invoke GetDlgItem,hWnd,ResId invoke SendMessage,eax,CB_GETCURSEL,0,0 mov eax,[Struct1+eax*4] mov [ESI].CONFIG.format.LHV1.Struct2,eax ret fillStruct endp
have any an idea?
greets ragdog
|