Closed lonnietc closed 1 year ago
Windigo is a very thin layer over the Win32 API, so any C or C++ system tray example should work.
This is the simplest example I can think of:
nid := win.NOTIFYICONDATA{}
nid.SetCbSize()
nid.Hwnd = hWnd // the owner HWND goes here...
nid.UID = 20_000 // any ID number
nid.UFlags = co.NIF_ICON | co.NIF_MESSAGE | co.NIF_TIP
nid.HIcon = hIcon // the icon to be shown
nid.SetSzTip("You hovered the tray icon")
win.ShellNotifyIcon(co.NIM_ADD, &nid)
And when closing your application, remove the system tray icon:
win.ShellNotifyIcon(co.NIM_DELETE, &nid)
Hello,
I am researching GUI frameworks for Golang and came across yours.
Is there any popup system tray example?
Thanks