% Fancyhello.c -- Hello, world as an ndialog program % Jessica L. Parsons % Wed Jan 16 08:55:08 PST 2008 #Fancyhello.c This is a more conventionally gui'ed version of ``Hello, world'', that will sit there sulking until you press the DONE button: /* * cc -o fancyhello fancyhello.c -lnd -lpanel -lncurses -lgpm */ #include main() { int rc; void *chain; chain = ObjChain(0, newOKButton(0, "Done", 0, 0)); init_dialog(); rc = MENU(chain, -1, -1, 0, "Hello, World!", 0); end_dialog(); deleteObjChain(chain); exit(rc == MENU_OK ? 0 : 1); } This produces pretty much exactly the same output as calling the dialog compatable function `dialog_mesgbox(0,"Hello,` `World!",-1,-1);`