Example #1
0
func MsgBox(parent Controller, title, caption string, flags uint) int {
	var result int
	if parent != nil {
		result = w32.MessageBox(parent.Handle(), caption, title, flags)
	} else {
		result = w32.MessageBox(0, caption, title, flags)
	}

	return result
}
Example #2
0
func main() {
	arg_num := len(os.Args)
	if arg_num < 3 {
		fmt.Println("Useage: MessageBox text title")
	} else {
		w32.MessageBox(0, os.Args[1], os.Args[2], w32.MB_ICONINFORMATION|w32.MB_OK)
	}
}
Example #3
0
func (b *MsgBuilder) error() {
	w32.MessageBox(w32.HWND(0), b.Msg, firstOf(b.Dlg.Title, "Error"), w32.MB_OK|w32.MB_ICONERROR)
}
Example #4
0
func (b *MsgBuilder) yesNo() bool {
	r := w32.MessageBox(w32.HWND(0), b.Msg, firstOf(b.Dlg.Title, "Confirm?"), w32.MB_YESNO)
	return r == w32.IDYES
}