April 26, 2001
How do you get an icon onto the system tray ?


April 26, 2001
Where on the system tray?
The clock/status area?

Add:
   NOTIFYICONDATA    notifyicondata =
   {
      sizeof ( NOTIFYICONDATA )        ,
      hwnd                                           ,
      0x<some id>                       ,
      NIF_ICON | NIF_MESSAGE | NIF_TIP ,
      WM_USER + 1                      ,
      hicon                ,
      "text"                 ,
   };

   Shell_NotifyIcon ( NIM_ADD, &notifyicondata );

Remove:
   NOTIFYICONDATA    notifyicondata =
   {
      sizeof ( NOTIFYICONDATA )        ,
      hwnd                   ,                // Same as above.
      0x<some id>                       ,    // Same as above
      0                                ,
      0                                ,
      0                                ,
      0                                ,
   };

   Shell_NotifyIcon ( NIM_DELETE, &notifyicondata );

Don't worry, be Kneppie!
Jan



Pramod Subramanyan wrote:

> How do you get an icon onto the system tray ?