Mail Archives: djgpp/1997/04/29/15:32:34
"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 -