How to make a taskbar (system tray) application in Windows

Code Monkey picture Code Monkey · Oct 30, 2012 · Viewed 17.4k times · Source

The only way I know to launch a windows application is through CreateWindow. Unfortunately, there is not a window style for a taskbar application, and I was wondering how to make a one. I did find this explanation in C#, but I am looking for a solution able to be compiled with VC++ 2008. Any solutions?

Answer

valdo picture valdo · Oct 30, 2012

The key is Shell_NotifyIcon (as other users suggested).

In a standard scenario your application should have at least one window (at least to receive system tray notification messages). Possibly hidden. On right-click on your tray icon it's a good tone to display a sort of a popoup menu.

I think you may look at this. This simple program demonstrates how to use the system tray in a very minimalistic way.