Hi, I wonder how to programm a try-icon-list.
Perhaps someone of you has experience.

Bye !
Posted on 2003-04-25 05:47:04 by Forginforcer
Hi, I wonder how to programm a try-icon-list.
Huh???? What is a "try-icon-list"? :confused:
Posted on 2003-04-25 06:11:57 by sluggy
you know, the little batten where all trayed programms are. :alright:

P.S. Perhaps I made a little typo
Posted on 2003-04-25 06:27:43 by Forginforcer
Hi Red,
Somrthing like this. Just look for the WM_USER+27 message in your message loop.

Insert the Icon
invoke LoadIcon,hInst,ICO_TRAY


mov NID.hIcon,eax
mov NID.cbSize,SIZEOF NOTIFYICONDATA
mov eax,hDlg
mov NID.hwnd,eax
mov NID.uID,1
mov NID.uFlags,NIF_ICON or NIF_MESSAGE or NIF_TIP
mov NID.uCallbackMessage,WM_USER + 27
invoke LoadString,hInst,IDC_TRAYTIP,ADDR NID.szTip,SIZEOF NID.szTip
invoke Shell_NotifyIcon,NIM_ADD,ADDR NID
Remove the Icon
mov NID.cbSize,SIZEOF NOTIFYICONDATA

mov eax,hDlg
mov NID.hwnd,eax
mov NID.uID,1
invoke Shell_NotifyIcon,NIM_DELETE,ADDR NID
Posted on 2003-04-25 07:07:30 by donkey
As I see well, its a sample to make a try-icon, isn't ?
I would like to get all trys...
Posted on 2003-04-25 07:28:04 by Forginforcer
I assume you mean a Tray Icon. This will add one and delete it. To get a list of current tray Icons you have to use something else. I don't know how to do that, never needed it and can't see a use so I was never interested to find out how.
Posted on 2003-04-25 07:38:45 by donkey
Ahh, a tray icon list. There is no way of enumerating the icons already in the tray (at least there is no way that i have ever seen, although you may discover some hack to do it).
Posted on 2003-04-25 14:19:03 by sluggy
I saw something about this on the ExpertsExchange once, you'll have to pay to search the database though, they don't give advice away for free. It was a long and involved process that was written in C++, something about hooking to the WindowProc of the SysTray, but I can't remember exactly what it was.

This might help but it's not in ASM so I can't comment on it working or not or even if it's good code.
Posted on 2003-04-25 14:37:37 by donkey