Recent activity

How set up windows icon in the app title bar? 3 months ago

From Stefano Balzarotti to ~eliasnaur/gio

I need to set the icon in the window title bar for windows. I can’t find any way.
I see there is a code that loads an icon from resources, but I am not sure if it’s the window icon, and I can’t understand how to set it.

func LoadImage(hInst syscall.Handle, res uint32, typ uint32, cx, cy int, fuload uint32) (syscall.Handle, error) {
    h, _, err := _LoadImage.Call(uintptr(hInst), uintptr(res), uintptr(typ), uintptr(cx), uintptr(cy), uintptr(fuload))
    if h == 0 {
        return 0, fmt.Errorf("LoadImageW failed: %v", err)
    return syscall.Handle(h), nil

The res uint32 seems to be set to be set to 1 and I can’t understand how to load it.