From: mapson AT mapson DOT com (mapson) Newsgroups: comp.os.msdos.djgpp Subject: Allegro GUI question Date: Mon, 14 Jul 1997 23:04:58 GMT Organization: Yale University, Department of Computer Science, New Haven, CT Lines: 36 Message-ID: <33cab096.48306491@babyblue.cs.yale.edu> NNTP-Posting-Host: slip-ppp-node-01.cs.yale.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I've read the docs, gone through all example programs, studied the Grabber code... still, it eludes me just precisely how to use various features of the GUI package in Allegro. For a start, here's a little problem I have: I can make a nice little d_check_proc box, but I have no idea how to read back the value of the box (i.e., checked or not checked). I'm sure it is easy, but I just don't know how. Here's my code: DIALOG g_toggle_dialog[] = { >// (dialog proc) (x) (y) (w) (h) (fg) (bg) (key) (flags) (d1) (d2) (dp) >{ d_check_proc, 16, 28, 120, 12, 255, 0, 0, D_SELECTED, 0, 0, "Hello" }, >{ d_check_proc, 16, 40, 120, 12, 255, 0, 0, 0, 1, 0, "Jambo" }, >{ d_button_proc, 60, 52, 55, 12, 255, 0, 0, D_EXIT, 0, 0, "OK" }, >{ NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL } }; [sorry, I needed the ">"s to stop relentless word wrap] now, if I call it with a do_dialog(g_toggle_dialog,-1); it certainly does the pretty stuff. But how do I know if "Hello" is checked or not by the user? Post here, please. And any other tips on the basic philosophy of the Allegro GUI approach would be appreciated... it seems very powerful, but I must say that I think it is perhaps the least well documented portion of Allegro. Making menus work properly has been very difficult, for instance- I find myself skipping the do_dialog manager altogether and just use do_menu to avoid tangles. Thanks, all.