delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/24/17:01:42

From: "Chia" <chia AT top DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Allegro's GUI
Date: Sat, 24 Jan 1998 15:47:03 -0600
Organization: Home
Lines: 25
Message-ID: <6adnhn$spn@nnrp3.farm.idt.net>
NNTP-Posting-Host: max2-18.top.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I'm having a little trouble with the allegro GUI. (3.0)  I've got a couple
of menus and I have a quit option.  The file-quit worked fine, and then I
decided that it'd be nice if it would also quit if you hit escape.  So, I
added a keyboard proc to the dialog and then my escape didn't work at all.
I then determined that I had to change my quit procedure a little bit.  Now,
instead of calling the exit() function, the quit function returns a D_CLOSE
value.
I apparently didn't set the dialog to run correctly, and I'm having some
problems figuring out what I am supposed to do.

This is what I've got now:

    while(1) {
        do_dialog(dlg, -1);
    }

And that's obviously not right because even if the thing sends a close
message, it's just going to start repeating itself over and over again.  So,
I need to figure out some way to change that.
When I looked at the example programs and grabber.c, they have all sorts of
stuff about an interger "ret" which I figure is what I've got to try to
understand.
Can someone give me a few pointers as to how I should handle this?  Thanks!


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019