MCPcopy Index your code
hub / github.com/lxn/walk / SetOverlayIcon

Method SetOverlayIcon

progressindicator.go:88–103  ·  view source on GitHub ↗
(icon *Icon, description string)

Source from the content-addressed store, hash-verified

86}
87
88func (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}

Callers 1

WndProcMethod · 0.80

Calls 2

errorFromHRESULTFunction · 0.85
handleForDPIMethod · 0.65

Tested by

no test coverage detected