Search code examples
c++winapisystem-tray

How to make a System Tray Icon visible in multiple desktops?


I'm not sure if I'm asking the questions using the right terminology, but I hope to be clear enough. I'm working on an application that resembles a kyosk. After the application starts, it creates a new desktop with limited capabilities. Using a key combo I can move back and forth between desktops. In order to inform the user about the desktop it's currently using, or any other information I've created a System Tray icon, which is displaying balloon messages.

The trouble is that the newly created desktop starts a new explorer.exe process using CreateProcess function, and because of that my icon from system tray is not displayed, only the "system" icons like volume, internet connection status, baterry status etc.

I wasn't expecting my tray icon to be visible in the new desktop, but I was wondering if there is a way to make this possible.

Thanks for reading, hope I was clear enough.


Solution

  • Each notification icon is shown on the desktop of its owning process. So, for each desktop on which you wish to show a notification icon, you will need to create that icon from a process inside that desktop.

    You will also quite likely need to use IPC to communicate between the different processes.