WndProc (stack clean up?)



When using a window procedure, do I need to clean up the stack or will
windows clean up the stack for me? Do I need the RET 16 or can I just
RET?

For example:

WndProc:

push ebp
mov ebp, esp

cmp [ebp+12], dword WM_CREATE ; window message
jz wm_create
jmp default

wm_create:

jmp default

default:

push dword [ebp+20]
push dword [ebp+16]
push dword [ebp+12]
push dword [ebp+8]
call [DefWindowProcA]

leave
ret 16

.



Relevant Pages