Beispiel #1
1
func MsgBox(owner Form, title, message string, style MsgBoxStyle) int {
	var ownerHWnd win.HWND

	if owner != nil {
		ownerHWnd = owner.Handle()
	}

	return int(win.MessageBox(
		ownerHWnd,
		syscall.StringToUTF16Ptr(message),
		syscall.StringToUTF16Ptr(title),
		uint32(style)))
}
Beispiel #2
1
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)
}