News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

invoke Shell_NotifyIcon, NIM_MODIFY, addr nis fails

Started by jj2007, June 03, 2016, 10:41:01 PM

Previous topic - Next topic

jj2007

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.