Git Product home page Git Product logo

wingui's Introduction

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.

wingui's People

Contributors

whtiehack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wingui's Issues

防掉线是否可以改进添加一个功能

现阶段,貌似不能识别正在排队还未进入游戏的这个阶段,必须要进入游戏以后才可以开启功能

是否可以改进,在正在排队的情况下 可以开启辅助,并且可以在识别到已经排进去了以后自动进入正常流程

编译失败

你好,第一次接触Go,因为朋友发给我的wowjump失效了(9月12的版本),于是我尝试自己编译,最后弄到gcc failed,网上查说是因为32位写的代码无法在64位环境编译(不确定,不熟悉Go),希望能得到你的帮助。

关于”select ret 0 没有找到WOW窗口"的问题

你好大佬,之前一直用你的wowjump,在重装了一次系统后(WOW在D盘没有重装),使用软件时会出现以下问题,
“2022/04/14 02:48:32 hwndArr [331092]
2022/04/14 02:48:32 select ret 0
2022/04/14 02:48:32 没有找到WOW窗口
”,我开始以为是注册表的问题,重装了游戏,仍然出现相同问题,新建一个“魔兽世界.TXT"的文档也依然无法检测。
查看了下代码,时隔太久发现也看不太明白了哈哈。不知是否可以帮忙解决下这个问题,感谢你的分享!

和lxn/walk的区别

库确实不错,足够小巧。我看封装思路和walk类似吧,但和walk比完善度还欠缺一点。walk没有好的设计器,这个工程的设计器思路还是相当好的。能否前台使用你的设计器,后台直接使用walk?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.