+WINDOW *msg_box(WINDOW *win, int w, int h, const char *format, ...)
+{
+ va_list ap;
+ char txt[255];
+ int mw, mh;
+ WINDOW *dialog;
+ va_start(ap, format);
+ vsprintf(txt, format, ap);
+ va_end(ap);
+
+ mw = strlen(txt)+2;
+ mh = 3;
+ dialog = derwin(win, mh, mw, h/2-mh/2, w/2-mw/2);
+ box(dialog, 0 ,0);
+ mvwaddstr(dialog, 1, 1, txt);
+ wrefresh(dialog);
+ curs_set(0);
+ return dialog;
+}
+
+void msg_box_free(WINDOW *padre, WINDOW *win)
+{
+ werase(win);
+ wrefresh(win);
+ delwin(win);
+ curs_set(1);
+ wrefresh(padre);
+}
+