Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 223
Code Monkey Avatar asked Oct 30 '12 19:10

Code Monkey


People also ask

How do I move apps from taskbar to system tray?

Move Icons on the Taskbar Just press down on an icon with your mouse (or finger on a touch-screen device) and drag it to the left or right.


1 Answers

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.

like image 70
valdo Avatar answered Oct 26 '22 06:10

valdo