# win32gui_demo **Repository Path**: hliang/win32gui_demo ## Basic Information - **Project Name**: win32gui_demo - **Description**: Golang 使用 win32 api封装 (github.com/lxn/win) 编写图形界面小工具的demo - **Primary Language**: Go - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2018-03-09 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Golang 用 Win32 API 编写图形界面小工具 安装win32 api的go封装 go get -u -v github.com/lxn/win 使用[ResEdit](http://www.resedit.net/)创建资源文件(.rc) * 添加资源:对话框,设计好对话框 * 添加资源:Manifest清单,编辑好需要的字段 保存后得到三个文件 .rc, .h, manifest.xml 用MinGW带的winres工具编译资源 winres -O coff -i resource.rc -o rsrc.syso 将生成的 rsrc.syso 放到go源码目录 将 .h 文件中的宏定义常量移植到 go 代码中 在编译时加上参数 -ldflags="-H windowsgui" 可去掉黑框(cmd窗口)