Wingui Save

Golang GUI library for windows, UI created by ResEdit or Visual Studio Resource Editor

Project README

Windows GUI Library - wingui

GitHub Go Report Card GoDoc GitHub All Releases

Actions Status

Golang GUI library for windows, UI created by ResEdit or Visual Studio Resource Editor

Lightweight, high performance and small executable file size Windows GUI library.

UI Design tool

ResEdit

Visual Studio Resource Editor

Other dialog box editor

Requires

GCC (Optionally, windres.exe can be used to generate a syso file from res or rc.)

MinGW http://www.mingw.org

or

TDM-GCC http://tdm-gcc.tdragon.net/

windres.exe

This tool in TDM-GCC-64/bin/windres.exe,don't know where in MinGW.

You can also use rc.exe and link.exe to generate syso file.

Usage

Simple usage:

Generate x.syso file from rc or res file use windres.exe tool.

generate syso file:

windres -i emptyProject/Debug/resource.res -O coff -o vsui.syso

or

windres -i ui/ui.rc -O coff -o ui.syso

main.go

package main

import "github.com/whtiehack/wingui"

func main() {
	dlg, _ := wingui.NewDialog(101, 0, nil)
	dlg.SetIcon(105)
	btnok, _ := wingui.BindNewButton(1002, dlg)
	btncancel, _ := wingui.BindNewButton(1003, dlg)
	btnok.OnClicked = func() {
		dlg.Close()
	}
	btncancel.OnClicked = btnok.OnClicked
	dlg.Show()
	// This invoke is optional.
	wingui.SetCurrentDialog(dlg.Handle())
	wingui.MessageLoop()
}


run: go run .

Don't use go run main.go, because golang can't load x.syso files.

More examples

Examples

see https://github.com/whtiehack/wingui/tree/master/examples

Welcome PRs.

References

https://github.com/lxn/walk

https://github.com/sumorf/gowi

https://docs.microsoft.com/zh-cn/windows/win32/

https://docs.microsoft.com/zh-cn/windows/win32/uxguide/controls

https://docs.microsoft.com/zh-cn/windows/win32/controls/window-controls

Screenshot

UI Screenshot details

Effect

resedit

wowjump

File size

size

ResEdit

resedit

wowjump ResEdit Download

Visual Studio Resource Editor

vsreseditor

TODOs

click to show
  • Edit

  • Static Text

  • Image

  • ComboBoxx

  • ListBox


Button
  • PushButton
  • CheckBox
  • Radio Button

  • Slider Control

  • Progress Bar

  • Tab Control

  • ListView Control

  • Spin Control

  • Rich Edit

  • DateTimePicker

  • Month Calendar

  • TreeView Control

  • Hot Key

  • Accelerator

  • Menu

Recommend

If you need to do complex GUI programs, you can use govcl or walk.

Open Source Agenda is not affiliated with "Wingui" Project. README Source: whtiehack/wingui
Stars
123
Open Issues
1
Last Commit
4 months ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating