Good friend Ramon:
I'm studing some examples here and just noticed a little change in the starting code from EC2. Before, you got something like:
.If uMsg == WM_CREATE
.ElseIf uMsg == WM_COMMAND ; you pressed some button
LoWord wParam
.If Ax == IDC_WINDOW1_THEBUTTONPRESSED
HiWord wParam
.If Ax == BN_CLICKED
; do some stuff with button, etc
And now we got:
.If uMsg == WM_CREATE
;====================
; Initialization code
;====================
.ElseIf uMsg == WM_COMMAND
Mov Edx, wParam
Shr Edx, 16
Mov Eax, wParam
And Eax, 0000FFFFH
Invoke OnWindowCommand, hWnd, Eax, Edx, lParam
@@: Ret
My guess is that you can keep the queue cleaner by moving all the messages stuff into the (ie.) "OnWindowCommand" procedure and also unify the x86-x64 code. That's fine, now my question:
Can I just code as usual inside that procedure?. Example:
OnWindowCommand Proc Private hWndParent:HWND, uCtlID:ULONG, uCode:ULONG, hWndChild:HWND
;============================================================
; Code for WM_COMMAND messages (child controls notifications)
;============================================================
LoWord wParam
.If Ax == IDC_WINDOW1_THEBUTTONPRESSED
HiWord wParam
.If Ax == BN_CLICKED
; do some stuff with button, etc
Xor Eax, Eax ;Return FALSE
Ret
OnWindowCommand EndP
Because there are less examples now and none include this scenary, they just go as usual and don't use this new funcionality.
Regards.