PWB Extensions Help (ext.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
DoMessageBox
◄Up► ◄Contents► ◄Index► ◄Back►
─────PWB Extensions─────────────────────────────────────────────────────────
Syntax: int DoMessageBox( char far *Text1, char far *Text2,
char far *Text3,
int Response, int idHelp );
int DoMessageBoxHelp( char far *Text1, char far *Text2,
char far *Text3,
int Response, int idHelp,
char far *HelpFile );
Returns: Index number of the selected button.
See: DoMessage, DoStatusBox, ReadChar, ReadCmd
DoMessageBox and DoMessageBoxHelp display a dialog box and wait for
a mouse or keyboard response. The strings <Text1>, <Text2>, and
<Text3> are displayed in the dialog box.
The <Text1> string is required, but <Text2> and <Text3> are
optional. Empty strings make the lines blank; NULL pointers
eliminate the lines.
If MBOX_CAPTION is specified in <Response>, <Text1> is the dialog
box title. Otherwise, <Text1> is the first line of text in the
dialog box.
The <idHelp> is the number of the dialog-box Help screen opened
when the user clicks the Help button. If idHelp is 0, there is no
Help button. For DoMessageBox, the topic string passed to Help is:
pwb.hlp!d.<nnnn>
The <nnnn> is the value of <idHelp>. For DoMessageBoxHelp, the
topic string is:
<HelpFile>d.<nnnn>
The <HelpFile> string must specify an internal Help database name,
and must end with an exclamation point (!).
See: ◄Creating Help Files with HELPMAKE► ◄Using Help IDs►
The <Response> argument specifies the buttons to display and other
attributes of the dialog box. One of the following button constants
must be given:
MBOX_OK MBOX_OKCANCEL MBOX_RETRY
MBOX_YESNOCANCEL MBOX_ABORT
MBOX_RETRYCANCEL MBOX_YESNO
The <Response> argument can be modified by combining the button
constant with the following attribute constants. You combine values
by using the bitwise-OR operator (|):
Constant Attribute
MBOX_BEEP Beep when dialog is displayed
MBOX_CAPTION Use <Text1> as dialog box title
An additional constant, MBOX_TYPE, is a mask that can be used to find
attributes of a response variable.
The following return values indicate which button was selected:
MBOX_IDOK MBOX_IDABORT MBOX_IDRETRY MBOX_IDNO
MBOX_IDCANCEL MBOX_IDIGNORE MBOX_IDYES
When an extension function is called from a macro or chosen as a
menu command, PWB automatically chooses the default button in all
message boxes. The macro can restore the message box by specifying
the macro prompt directive (<).
See: ◄PWB Macro Prompt Directives►
-♦-