(icon *Icon, description string)
| 86 | } |
| 87 | |
| 88 | func (pi *ProgressIndicator) SetOverlayIcon(icon *Icon, description string) error { |
| 89 | handle := win.HICON(0) |
| 90 | if icon != nil { |
| 91 | handle = icon.handleForDPI(int(win.GetDpiForWindow(pi.hwnd))) |
| 92 | } |
| 93 | description16, err := syscall.UTF16PtrFromString(description) |
| 94 | if err != nil { |
| 95 | description16 = &[]uint16{0}[0] |
| 96 | } |
| 97 | if hr := pi.taskbarList3.SetOverlayIcon(pi.hwnd, handle, description16); win.FAILED(hr) { |
| 98 | return errorFromHRESULT("ITaskbarList3.SetOverlayIcon", hr) |
| 99 | } |
| 100 | pi.overlayIcon = icon |
| 101 | pi.overlayIconDescription = description |
| 102 | return nil |
| 103 | } |
no test coverage detected