It just occurred to me...
has anyone ever tried replacing the DefWindowProc? I mean, the whole thing so you don't have to call it from the application defined Window Proc. I figure, if anyones tried it, it must have been an ASM person.
--Chorus
has anyone ever tried replacing the DefWindowProc? I mean, the whole thing so you don't have to call it from the application defined Window Proc. I figure, if anyones tried it, it must have been an ASM person.
--Chorus
The answer is yes, it just depends on how you look at it.
all DefWindowProc does is define some default behaviour for control X so a typical loop looks like so.
You will notice that in the paint event, we did not call DefWindowProc. There was no need as we handled the paint event completely ourselves. In effect, we redefined what the default behaviour for this control was.
I do not believe anyone would willingly replace every single message that there is just to do it hehe. Egads what a lot of work that would take.
all DefWindowProc does is define some default behaviour for control X so a typical loop looks like so.
WinProc
.if msg == WM_PAINT
;do_paint
xor eax, eax
inc eax
ret
.endif
invoke DefWindowProc (blah blah blah)
ret
You will notice that in the paint event, we did not call DefWindowProc. There was no need as we handled the paint event completely ourselves. In effect, we redefined what the default behaviour for this control was.
I do not believe anyone would willingly replace every single message that there is just to do it hehe. Egads what a lot of work that would take.
hehe..
I meant *every* message :)
I know that you don't have to call the DefWindowProc if you handle the message completely yourself (although there are instances where I find I must call it even if I do intercept a message). Personally, I like to try and find ways *not* to call APIs or DefWindowProc (basically anything that I don't have control over). So, I just thought I'd ask :)
cya
--Chorus
I meant *every* message :)
I know that you don't have to call the DefWindowProc if you handle the message completely yourself (although there are instances where I find I must call it even if I do intercept a message). Personally, I like to try and find ways *not* to call APIs or DefWindowProc (basically anything that I don't have control over). So, I just thought I'd ask :)
cya
--Chorus
Personally, I like to try and find ways *not* to call APIs or DefWindowProc (basically anything that I don't have control over).
Yes, you could dig into the User32.dll where DefWindowProc resides. :tongue: