Hossa

i read iczelions tut about tray icons and i think first i got it ,but after typing some lines of code i must say im missing something.
because the tray icon i show is empty and i cant press on it.
any ideas what im missing ?

Thanks


some lines how i load icon ,the same way i show the icon on the dialog and there it works.

.data
NOTIFYICONDATAA STRUCT
;cbSize DWORD ?
hwnd DWORD ?
uID DWORD ?
;uFlags DWORD ?
uCallbackMessage DWORD ?
hIcon DWORD ?
szTip BYTE 64 dup (?)
NOTIFYICONDATAA ENDS


hicon dd 0
hinst_ dd 0

.code

---------
.ELSEIF wmsg==WM_SIZE

.if word ptr ==SIZE_MINIMIZED

mov note.cbSize, size NOTIFYICONDATA
push hwnd_
pop note.hwnd

mov note.uID, IDI_TRAY
mov note.uFlags, NIF_ICON+NIF_MESSAGE+NIF_TIP
mov note.uCallbackMessage, WM_SHELLNOTIFY

call LoadIconA, hinst_,ICON1
mov hicon, eax

call lstrcpy, offset note.szTip, offset AppName
;call ShowWindow,hwnd_, SW_HIDE
call Shell_NotifyIcon, NIM_ADD, offset hicon


.elseif word ptr ==SIZE_RESTORED


call ShowWindow, hwnd_, SW_RESTORE
call Shell_NotifyIcon, NIM_DELETE, offset hicon

.endif

and when i use this in wminitdlg :
call LoadIconA,hinst_,ICON1
mov hicon, eax
call SendMessageA, hwnd_, WM_SETICON, ICON1, hicon

it works fine,but why the try icon not ?
----------------

heres the samplefile with resource:
Posted on 2001-12-21 09:28:29 by Max
aehm...hum...LOOOOOOOOOOOOOOOL
sitting two hours and then i see im blind :)

NOTIFYICONDATAA STRUCT
;cbSize DWORD ? <---- WHY use i ;
hwnd DWORD ?
uID DWORD ?
;uFlags DWORD ? <---- WHY use i ;
uCallbackMessage DWORD ?
hIcon DWORD ?
szTip BYTE 64 dup (?)
NOTIFYICONDATAA ENDS

ARG...wheres fresh coffee ???
Posted on 2001-12-21 09:39:58 by Max