How setup a title bar icon with Gio

I am having a problem with Gio UI (

My test App

As you see there the window icon is not set, and there are no options to set it.

When you create a new window you can only set the title:

w := app.NewWindow(app.Title("My APP Title")) 

But if I understand correctly the icon should be loaded from resources manifest:

go\pkg\mod\[email protected]\app\internal\windows\windows.go


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

To build resource manifest I am using go winres:

I have setup correctly in the winres.json the app icon and the icon in the taskbar as explained in the guide.

I think there should be a way to set also the window icon in app title, but I can't find which key should I specify in the json:

    "APP": {
      "0000": [
    "OTHER": {
      "0000": "icon.png"
    "#42": {
      "0409": "icon_EN.ico",
      "040C": "icon_FR.ico"


  • The official way to do it is to use gogio tool that unluckily is very poorly documented and has a lot of limitations compared to go-winres.

    Install it with with go install

    Then compile your application with this command:

    @GOOS=windows GOARCH=amd64 gogio -buildmode=exe -icon=appicon.png -arch=amd64 -target=windows -o myapp.exe app-path/

    Change architecture and paths according to your needs.

    Anyway as far as I understand gogio supports only png and it will generate automatically all needed resolutions.

    Since I want to use go-winres, I have just used Resource Hacker to decompile the exe resources.

    I found that to set the icon you need to set winres.json like this:

      "RT_GROUP_ICON": {
        "#1": {
          "0409": "myicon_EN.ico"
      "RT_MANIFEST": {
        "#1": {
    // Your settings

    Then you can compile normally with go build and go-winres, just remember to set -ldflags=-H=windowsgui