Maybe not the prettiest solution, but it works.
You should remove the WS_EX_TOOLWINDOW style again when removing it from the tray.
lError = Shell_NotifyIcon(NIM_ADD,ADDRESS(gNotifyIconData))
ShowWindow(wTest{Prop:Handle},SW_HIDE)
lStyle = GetWindowLong(wTest{PROP:Handle}, GWL_EXSTYLE)
lStyle = BOR(lStyle, WS_EX_TOOLWINDOW)
ret# = SetWindowLong(wTest{PROP:Handle}, GWL_EXSTYLE, lStyle)
ShowWindow(wTest{Prop:Handle},SW_SHOW)
Hope it helps…