Re: WndProc (stack clean up?)
- From: NoSpam@xxxxxxxxxxx (Bob Masta)
- Date: Thu, 31 Jul 2008 11:41:19 GMT
On Wed, 30 Jul 2008 18:02:04 -0700 (PDT), "bwaichu@xxxxxxxxx"
<spamtrap@xxxxxxxxxx> wrote:
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
I don't know about other assemblers, but in MASM you can use a PROTO
to take care of all this automatically.
Best regards,
Bob Masta
DAQARTA v4.00
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, Sound Level Meter
FREE Signal Generator
Science with your sound card!
.
- References:
- WndProc (stack clean up?)
- From: bwaichu@xxxxxxxxx
- WndProc (stack clean up?)
- Prev by Date: Re: disassembly of Debug.exe?
- Next by Date: Re: disassembly of Debug.exe?
- Previous by thread: Re: WndProc (stack clean up?)
- Index(es):
Relevant Pages
|