www.digitalmars.com         C & C++   DMDScript  

c++ - Getting an icon onto the System Tray [in win95]

reply "Pramod Subramanyan" <pramod_sx rediffmail.com> writes:
How do you get an icon onto the system tray ?
Apr 25 2001
parent Jan Knepper <jan smartsoft.cc> writes:
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 ?

Apr 25 2001