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 }
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) } }
func (b *MsgBuilder) error() { w32.MessageBox(w32.HWND(0), b.Msg, firstOf(b.Dlg.Title, "Error"), w32.MB_OK|w32.MB_ICONERROR) }
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 }