自学Go语言Windows

作者:源码世界时间:2014-03-25分类:Google Go评论:0浏览:5982

1. [代码][Google Go]代码     跳至 [1]
package main

import (
	"github.com/lxn/win"
	"strconv"
	"syscall"
)

func _TEXT(_str string) *uint16 {
	return syscall.StringToUTF16Ptr(_str)
}
func _toString(_n int32) string {
	return strconv.Itoa(int(_n))
}
func main() {
	var hwnd win.HWND
	cxScreen := win.GetSystemMetrics(win.SM_CXSCREEN)
	cyScreen := win.GetSystemMetrics(win.SM_CYSCREEN)
	win.MessageBox(hwnd, _TEXT("屏幕长-:"+_toString(cxScreen)+"宽:"+_toString(cyScreen)), _TEXT(" 消息"), win.MB_OK)
}

如果您没有找到适合你的解决方案,请联系我们寻求帮助支付鼓励

标签:Google   Go  
返回顶部
分享按钮