Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_msg() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_MSG()

 DESCRIPTION

 C_MSG() displays a message box on the screen providing information
 and a prompt (question) to the user, allowing a controlled
 response.  Up to three lines of text and an additional line for a
 prompt can be specified, or the default prompts may be used.  The
 message box and text is automatically centered on the screen.  The
 screen row to draw the box, the box type, and box color can
 optionally be specified.

 SYNTAX

 C_MSG(row, msg_type [,box] [,shadow] [,color] [,str1] [,str2] [,str3]
 [,prompt])

 PARAMETERS

 row (N) is the screen row to display the message box.

 msg_type (N) is the message prompt and key control type, as
 follows:

 TYPE  MESSAGE PROMPT                                  KEYS ACCEPTED
 ----  --------------------------------------------    ---------------------
 0     None                                            Does not wait for key
 1     Press any key to continue...                    All keys
 2     Press any key to continue or <ESC> to cancel    All keys
 3     Enter (Y)es/(N)o/<ESC>                          Y,y,N,n,<ESC>
 4     Enter (Y)es or (N)o                             Y,y,N,n

 box (N) is the type of box (0-5) to display.  The box types are as
 follows:  0=no box, 1=single box, 2=double box, 3=double top/single
 sides, 4=single top/double sides, and 5=Solid graphics.  If box is
 not specified, box type 2 (double) is used.

 shadow (N) is the type of shadow to display around the box.  The
 shadow types are as follows:  0 = no shadow, 1 = left side/bottom shadow,
 and 2 = right side/bottom shadow.  If shadow is not specified, no shadow is
 displayed.

 color (C) is the color to display the box.  If color is not specified,
 the current Clipper color is used.

 str1 (C) is the character string for the first line.

 str2 (C) is the character string for the second line.

 str3 (C) is the character string for the third line.

 prompt (C) is the character string for the prompt or question to
 the user.  If prompt is specified, it will override the default
 prompts listed above.

 RETURNS

 C_MSG() returns one of the following values depending on the given
 msg_type:

 MSG_TYPE   RETURN VALUE
 --------   ------------
 0          No return value
 1          Empty ("")
 2          "E" for Escape, otherwise empty ("")
 3          "E" for Escape, "Y" for Yes, "N" for No
 4          "Y" for Yes, "N" for No

 EXAMPLES

 &&  Message using default parameters

 c_msg(10,"","","","","","Message Using All Default Parameters")

 &&  Message at row 9, in double box and shadow, with prompt:
 &&  Press any key to continue or <ESC> to cancel

 y1=c_msg(9,2,2,2,"W/B","The Diskette in Drive A: is Not Ready")

 &&  Message at row 7, in single box and shadow, with prompt:
 &&  Enter (Y)es or (N)o

 y1=c_msg(7,4,1,2,"W/B","Number Not Found","Do You Want to Reenter?")

 &&  Message at row 10, in double box and shadow, with custom prompt
 && (string p1).
 &&  C_MSG() still controls the keys and accepts only yy, nn, or escape.

 p1 = "ENTER Y-YES / N-NO / <ESCAPE>"
 y1=c_msg(10,3,2,1,"W+/R","Number Not Found","Do You Want to Reenter?","",p1)


See Also: C_ERR() C_TEXT() C_PROMPT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson