the MOVSX and MOVZX instructions sign-extend or zero-extend a word or byte into a dword register
in the case of wParam and lParam, these parameters are defined as dword's (or dword size, at least)
so - if you want a word from one of those parms, you have to tell the assembler to over-ride the size
movsx eax,word ptr wParam ;sign-extends the low word of wParam into EAX
movzx eax,word ptr wParam+2 ;zero-extends the high word of wParam into EAXotherwise, you will get an error like "operand sizes must match" or "invalid operand"
if the parameter or variable is defined as a word or byte, then you do not need the "ptr" operator
the assembler knows which form of the instruction to use