MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / SetTooltip

Method SetTooltip

pkg/sys/shell.go:126–138  ·  view source on GitHub ↗

SetTooltip sets the tray icon tooltip.

(tooltip string)

Source from the content-addressed store, hash-verified

124
125// SetTooltip sets the tray icon tooltip.
126func (s *SystrayIcon) SetTooltip(tooltip string) error {
127 var data NotifyIconData
128 data.Size = uint32(unsafe.Sizeof(data))
129 data.Flags = NotifyIconGUIDFlag | NotifyIconTipFlag
130 data.GUIDItem = SystrayIconGUID
131 data.HWnd = s.wnd
132 tip := windows.StringToUTF16(tooltip)
133 if len(tip) > 128 {
134 tip = tip[:128]
135 }
136 copy(data.Tip[:], tip)
137 return ShellNotifyIcon(ShellModifyIcon, &data)
138}
139
140// ShowBalloonNotification renders the balloon notification
141// in the taskbar area. The icon is a customized notification

Callers 1

newSystrayFunction · 0.80

Calls 1

ShellNotifyIconFunction · 0.85

Tested by

no test coverage detected