Any ideas why this has no effect when pressing S or H? No errors returned.
CASE WM_KEYDOWN
mov edi, offset nid
.if wParam==VK_ESCAPE
invoke SendMessage, hWnd, WM_CLOSE, 0, 0
.elseif wParam==VK_H
m2m nids.dwStateMask, NIS_HIDDEN
m2m nids.dwState, NIS_HIDDEN ; 1
invoke Shell_NotifyIcon, NIM_MODIFY, edi
.elseif wParam==VK_S
m2m nids.dwStateMask, NIS_HIDDEN
and nids.dwState, 0 ; 0; there is no NIS_SHOW
invoke Shell_NotifyIcon, NIM_MODIFY, edi
.endif
P.S.: Got it - uFlags needed NIF_STATE 8)
The invoke Shell_NotifyIcon, NIM_MODIFY, edi sets "invalid parameter", but it succeeds; ChangeWindowMessageFilterEx fails internally. Anyway, it works fine now.