Charles Petzold uses a return after each WM processing in a ["winprok" :) ]
The point of this i think is to not have code "cascade" needlessly through the rest of the "switch" or ".elseif" respectively and return immediately.
example:
Shouldn't i use ret in asm as well after each message processing, or isn't it the same thing?
example:
The point of this i think is to not have code "cascade" needlessly through the rest of the "switch" or ".elseif" respectively and return immediately.
example:
? ?
case WM_DESTROY :
? ? PostQuitMessage (0) ;
? ? return 0 ;
Shouldn't i use ret in asm as well after each message processing, or isn't it the same thing?
example:
.elseif uMsg==WM_DESTROY
invoke PostQuitMessage, NULL
? ? ? ? ? ? ? ret
Sure thing, just remember putting a returnvalue in EAX first.
oops i just been corrected by Tedd, the .if .elseif .else conditional structure falls through without checking the remaining conditions thus returning after every message processing is redundant(except DefWindowProc).