title: multiple windows, single tray icon
body: <p>My goal is to have a single icon for all the windows of my application.</p>
  
  <p>After some reading, my understanding is that creating a tray icon is achieved through <code>Shell_NotifyIcon()</code>. This function gets a <code>NOTIFYICONDATA</code> structure which contains a <code>hWnd</code> field. This <code>HWND</code> is used by the system to notify the corresponding window of tray icon events. These events are handled by a <code>WindowProc</code> callback that is set on the window with <code>SetWindowLongPtr()</code>.</p>
  
  <p>Hence my questions:</p>
  
  <ul>
  <li>How can a single icon notify all the windows of my app of say a left mouse click ?</li>
  <li>Can I <code>Shell_NotifyIcon()</code> multiple times with different <code>NOTIFYICONDATA</code> structures, each one with a different <code>hWnd</code>, but with the same icon ?</li>
  <li>What if the original window that got registered for creating the tray icon is destroyed ?</li>
  </ul>
  
  <p>Would creating a hidden proxy window be an appropriate solution ?</p>
  
  <p>Some background: my application calls the WinAPI with C (using js-ctypes), and should ideally work on all Windows versions from XP on.</p>