Skip to content

Menus not displayed on Windows when v3/examples/dialogs is Ran #4927

@ndianabasi

Description

@ndianabasi

Description

Menus are not displayed on the launched window when v3/examples/dialogs/main.go is ran on Windows OS. This is due to not applying Windows-specific APIs within the example.

To Reproduce

  1. On Windows, go to v3/examples/dialogs.
  2. Run go run main.go
  3. The window will launch without any attached menu.

Expected behaviour

The configured menus should be attached to the specific window on Windows OS.

Screenshots

No response

Attempted Fixes

No response

System Details

# System 

┌────────────────────────────────────────────────────────────────────────────────────────────┐
| Name              | Windows 10 Pro                                                         |
| Version           | 2009 (Build: 26200)                                                    |
| ID                | 25H2                                                                   |
| Branding          | Windows 11 Pro                                                         |
| Platform          | windows                                                                |
| Architecture      | amd64                                                                  |
| Go WebView2Loader | true                                                                   |
| WebView2 Version  | 144.0.3719.93                                                          |
| CPU               | Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz                               |
| GPU 1             | Intel(R) UHD Graphics 620 (Intel Corporation) - Driver: 31.0.101.2135  |
| Memory            | 8GB                                                                    |
└────────────────────────────────────────────────────────────────────────────────────────────┘

# Build Environment 

┌───────────────────────────────┐
| Wails CLI   | v3.0.0-alpha.64 |
| Go Version  | go1.25.5        |
| -buildmode  | exe             |
| -compiler   | gc              |
| CGO_ENABLED | 0               |
| GOAMD64     | v1              |
| GOARCH      | amd64           |
| GOOS        | windows         |
└───────────────────────────────┘

# Dependencies 

┌────────────────────────────────────────────────────────────────────────────────┐
| MSIX Packaging Tool        | Not Installed                                     |
| SignTool.exe (Windows SDK) | Not Installed                                     |
| npm                        | 11.6.2                                            |
| NSIS                       | Not Installed                                     |
| MakeAppx.exe (Windows SDK) | Not Installed                                     |
| docker                     | *Not installed (optional - for cross-compilation) |
|                                                                                |
└─────────────────────────── * - Optional Dependency ────────────────────────────┘

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingawaiting feedbackMore information is required from the requestor

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions