Hi, excume my question, I view this code but I dont understand this line:




DlgProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM

mov eax,uMsg
.if eax==WM_INITDIALOG
.elseif eax==WM_COMMAND
mov eax,wParam -- --------------------> this line
mov edx,eax----------------------------> this line
shr edx,16-------------------------------------> this line
.if edx==BN_CLICKED
.if eax==IDC_BTN1
invoke GetDlgItemText,hWin,1004,addr buffer,sizeof buffer
invoke SetDlgItemText,hWin,1005,addr buffer
.endif
.if eax==IDC_BTN2
invoke SendMessage,hWin,WM_CLOSE,NULL,NULL
.endif
.if eax==IDC_BTN3
invoke ShellAbout,hWin,addr header,addr texto,NULL
.endif
.endif
.elseif eax==WM_CLOSE
invoke EndDialog,hWin,0
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
DlgProc endp


for why rotate this: shr edx,16
I dont understand this?

sorry for my low level in win32asm
Posted on 2004-08-09 14:25:20 by AarzaK
from MSDN: WM_COMMAND:

wParam
The high-order word specifies the notification code if the message is from a control. If the message is from an accelerator, this value is 1. If the message is from a menu, this value is zero.
The low-order word specifies the identifier of the menu item, control, or accelerator.

source is followed by a notification code:
edx==BN_CLICKED
Posted on 2004-08-09 14:47:03 by Black iCE