can you jump out of proc and then return with an answer?
is it allright to jump where I commented ;;;;jump here ?
and will it return to that spot?
thanks
proc Wm_CommandProc
.hwnd argd
.wparam argd
.lparam argd
cmp argv(.wparam), dword 201
je .cmd_idok
cmp argv(.wparam), dword 200
je .cmd_idgo
xor eax, eax
ret
.cmd_idok:
invoke EndDialog, dword argv(.hwnd), byte 1
mov eax, 1
ret
.cmd_idgo:
invoke SendDlgItemMessageA, dword argv(.hwnd), dword 205, dword WM_GETTEXTLENGTH, dword NULL, dword NULL
cmp eax, 0
jne .fine
invoke MessageBoxA, dword argv(.hwnd), dword szContent, dword szTitle, dword MB_OK | MB_ICONERROR
mov eax, 1
ret
.fine:
inc eax
mov ecx, eax
push eax
invoke GetProcessHeap
mov [dwHeap], eax
invoke HeapAlloc, eax, dword 0x000008, ecx
mov [dwText], eax
pop eax
invoke SendDlgItemMessageA, dword argv(.hwnd), dword 205, dword WM_GETTEXT, eax, dword dwText
;;;;; jump here
invoke SendDlgItemMessageA, dword argv(.hwnd), dword 206, dword WM_SETTEXT, dword 0, dword dwText
invoke HeapFree, dword dwHeap, dword 0x000008, dword dwText
mov eax, 1
ret
endproc