system tray icons from windows service

Hi Experts,
I'd like to show an s system tray icon when my service is running - but I don't want to use ATL or MFC - just STL if anything and straight Windows libraries.  Is there some wrapper around that can help me accomplish this?

Thanks,
Mike
LVL 1
threadyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
First of all: You cannot display a tray icon from a service unless you set the service to 'Interact with the Desktop' - which is not what you want to do, because thisw creates a potential security loophole. Yet if you'd want to go that way, see http://www.codeproject.com/KB/system/iconservice.aspx ("A service that displays an icon in the system tray"). A better idea would be to create a small app that displays that icon (and does nothingt else) and have it communicate with your service to get update info via some IPC mechanism, see http://www.codeproject.com/KB/threads/Win32IPC.aspx ("Windows IPC") for your options. That leaves us to the 'Icon' part, which is covered by http://www.codeproject.com/KB/shell/systemtray.aspx ("Adding Icons to the System Tray") which also demonstrates how to do that without using MFC.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
threadyAuthor Commented:
That's just what I was thinking and you confirmed it for me.  Just a side question on this other little app - can I launch it from my service on startup?
0
jkrCommented:
You can, but that's a bit more complicated. I'd rather place it in the 'Autorun' section, for the simple reason that a) noone might be logged on when your service starts and b) there might be more than 1 user logged on at a time.
0
threadyAuthor Commented:
I knew that side question would be worth asking. :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.