Just like a parent (HWND) can have multiple timers, it can have multiple notification area icons (TrayNotifications) differentiated by an ID. Use similar functionality as with timers to extend support to multiple icons per parent.
The Shell_NotifyIconW(NIM_SETVERSION, &mut data); call is necessary to ensure that the icon ID is passed in the expected format to process_events(...), as the version field is ignored otherwise (well, interpreted as the timeout value). This has been previously pointed out by @iquanxin in issue #246.
Just like a parent (HWND) can have multiple timers, it can have multiple notification area icons (TrayNotifications) differentiated by an ID. Use similar functionality as with timers to extend support to multiple icons per parent.
The
Shell_NotifyIconW(NIM_SETVERSION, &mut data);
call is necessary to ensure that the icon ID is passed in the expected format toprocess_events(...)
, as the version field is ignored otherwise (well, interpreted as the timeout value). This has been previously pointed out by @iquanxin in issue #246.