| Title: | Atari ST, TT, & Falcon |
| Notice: | Please read note 1.0 and its replies before posting! |
| Moderator: | FUNYET::ANDERSON |
| Created: | Mon Apr 04 1988 |
| Last Modified: | Tue May 06 1997 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 1433 |
| Total number of notes: | 10312 |
Hi all,
I have a problem using dialog-boxes in Personal Pascal. I want to
define a dialog box without an 'exit button'. However when I put this box
on the screen by the statement:
Pushed := Do_Dialog(The_Box, The_First_Button);
then the machine hangs in the Do_Dialog procedure. It is not possible to
return from Do_Dialog because I defined no there is no 'exit button'.
My question: Is there a work-around for this problem (without using windows)
to display a dialog box and get rid of it without user intervention. A possible
purpose I think of using this, is when the system is reading a file and the
user has to wait. In this case it should be possible to display the message:
Wait, reading from inputfile...
in a dialog box. When the machine is ready reading the file, the dialog box
can be removed. But, as I already mentioned, there is no way out without
clicking the mouse on an 'exit button'.
Willy Janssen
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 498.1 | There is a way to do this | CIM1NI::POWERS | I Dream Of Wires - G. Numan | Fri Jun 02 1989 11:07 | 13 |
RE: < Note 498.0 by JGO::JANSSEN "Willy Janssen" >
> -< Dialog box without an exit button??? >-
Yes this is possible to do, what you want, but you don't want to call
do_dialog. There is I think a routine to simply draw the dialog object,
I use it in a program I had written using PP. Will look it up tonight,
as I recall, it was not documented. Essentially it is the GEM function
objc_draw(), that this routine calls.
Bill Powers
| |||||
| 498.2 | routines in PP | CIM1NI::POWERS | I Dream Of Wires - G. Numan | Mon Jun 05 1989 09:22 | 26 |
In version 2 of PP, there is a procedure show_dialog(), it takes
2 parameters the first is the dialog ptr of the dialog you wish to display
and the second, is the tree index to start drawing down (to draw whole dialog
, this value should be 0).
ex: show_dialog(my_dialog,0);
In version 1 of PP, this routine doesn't exist, so you have to do this
declare the external procedure obj_draw like this.
procedure obj_draw(box:dialog_ptr; { dialog to display }
item:tree_index; { index of where to start drawing down }
depth:integer; { how deep to go }
x:integer; { location of dialog (x,y (upper left corner }
y:integer;
w:integer; { width & height }
h:integer); external;
Then just call this routine like you would call the C function
objc_draw, as they are the same. This procedure was undocumented in PP
version 1.
Bill Powers
| |||||