home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-12 | 1006 b | 32 lines | [TEXT/PJMM] |
- unit Report;
-
- interface
- uses
- Globals;
-
- procedure Report (reportstr: StringHandle);
-
- implementation
-
- {Print a string in dialog box}
- {############################ Report #################################}
-
- {We put up a dialog box, show the string, and wait for user to hit OK.}
-
- procedure Report (reportstr: StringHandle);
- {char ^^reportstr;}
- const
- rptboxid = 257; (* ID of our report dialog in resource file *)
- rpttext = 2; (* Item # of dialog's report text *)
- var
- itemhit: integer; (* which Item was clicked on (only OK avail) *)
- reportptr: DialogPtr;
- begin
- ParamText(reportstr^^, '', '', '');(* set text to display *)
- reportptr := GetNewDialog(rptboxid, nil, WindowPtr(-1));
- (* get from Resource file; NIL => use heap storage; -1 => make dlg frontmost *)
- ModalDialog(nil, itemhit);
- (* carry out dialog; NIL => no FilterProc; return Item Hit when done *)
- DisposDialog(reportptr); (* release storage and remove dialog from screen *)
- end; (* Report *)
- end.