delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/29/15:32:34

Newsgroups: comp.os.msdos.djgpp
From: tob AT world DOT std DOT com
Subject: Re: Custom dialog objects in ALLEGRO.
Message-ID: <E9EuzJ.J6I@world.std.com>
Sender: tob AT world DOT std DOT com (Tom Breton)
Reply-To: tob AT world DOT std DOT com
Organization: BREnterprises
References: <199704291141 DOT EAA26687 AT f47 DOT hotmail DOT com>
Date: Tue, 29 Apr 1997 17:52:31 GMT
Lines: 40
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

"Alex Holden" <bigal2000 AT hotmail DOT com> writes:
> I apologise if this is a stupid question, but I have created a custom dialog
> function in ALLEGRO, and I don't know how the function should
> recieve the size, location, and 'special' data fields, which are specified in
> the dialog box array. I can get it to display a fixed size and position object,
> but I am not sure how these extra fields are supposed to be passed to it on
> startup of the function so that I can make the size and position variable.

In allegro.txt, read the section on GUI carefully.

Your function prototype should look something like

        int some_name(int msg, DIALOG *d, int c)

location: d->x, d->y
size: d->w (width), d->h (height)
data fields: d->d1, d->d2 (ints), d->dp (generic pointer)

As long as you'r doing that, You might try my Presto dialog builder for
PC comptibles running DOS, SVGA, mouse. It can handle user-defined procs
such as you are doing here. Version 1.0 is available on my home page, at
http://world.std.com/~tob/presto10.zip. You need unzip or pkunzip to
extract it.

From file_id.diz:

Presto, a dialog builder for Shawn Hargreaves'
Allegro. Powerful, reliable and easy. For PC
comptibles running DOS, SVGA, mouse.
Features: Safeguards against many errors. Can
handle all proc types including user-defined.
Dialog previews. Can re-edit old work. Backs
up your work. Configurable. Complete docs,
including troubleshooting. Examples included.
Auto-generates mnemonics to make your code
safer. Point-and-shoot. Both user-defined and
predefined color selection. I used it to build
parts of itself and it's easy and powerful.


- Raw text -


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