SetIcon sets the tray icon.
(icon Hicon)
| 113 | |
| 114 | // SetIcon sets the tray icon. |
| 115 | func (s *SystrayIcon) SetIcon(icon Hicon) error { |
| 116 | var data NotifyIconData |
| 117 | data.Size = uint32(unsafe.Sizeof(data)) |
| 118 | data.Flags = NotifyIconGUIDFlag | NotifyIconIconFlag |
| 119 | data.GUIDItem = SystrayIconGUID |
| 120 | data.HWnd = s.wnd |
| 121 | data.Icon = icon |
| 122 | return ShellNotifyIcon(ShellModifyIcon, &data) |
| 123 | } |
| 124 | |
| 125 | // SetTooltip sets the tray icon tooltip. |
| 126 | func (s *SystrayIcon) SetTooltip(tooltip string) error { |
no test coverage detected