The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: 0x401000 on November 08, 2009, 10:09:05 PM

Title: Change system tray icon
Post by: 0x401000 on November 08, 2009, 10:09:05 PM
is there a way to change an icon in system tray??  ::)
Title: Re: Change system tray icon
Post by: 2-Bit Chip on November 09, 2009, 03:58:18 AM
BOOL Shell_NotifyIcon(     
    (DWORD) NIM_MODIFY,
    (PNOTIFYICONDATA) lpdata
);


Just use the orginal NOTIFYICONDATA structure you used before, but just edit lpdata.hIcon.
Title: Re: Change system tray icon
Post by: 0x401000 on November 09, 2009, 12:39:24 PM
This is in my program, but I mean, change the icon of another program in the tray. For example, the Internet connection icon changed or the icon to change the sound volume
Title: Re: Change system tray icon
Post by: fearless on November 09, 2009, 11:41:29 PM
A resource editor could be an option. Just open up the dll or exe that contains the icon you want to change (make a backup first just in case) with a resource editor, and change the icon.
Title: Re: Change system tray icon
Post by: 0x401000 on November 10, 2009, 01:48:37 PM
Not quite what I meant, you need a running connection icon on the Internet, to change dynamically on your own. So you need to put a hook and expose their data icons, or have any other option then