YesNoCancel_Box

See Also: Dialog and Message Box Functions, Info_Box, Message_Box, Stop_Box, YesNo_Box

Purpose

Displays a dialog box with Yes, No & Cancel buttons.

Return Type

Integer

Syntax

Use Windows.pkg

 

(YesNoCancel_Box( {sMessage} [, {sCaption} [, {Default-Button} ] ] ))

Where:

If you wish to specify a default button but not a caption, pass two quotation marks (null) as {sCaption}, followed by the desired default button.

What It Does

YesNoCancel_Box is used to pop a Yes/No/Cancel confirmation message box and obtain the user's response.  The passed message {sMessage} is displayed along with the Information icon, a Yes button, a No button, and a Cancel button.

The return value will be one of two predefined message-box return values:

Examples

Use Windows.pkg

 

Procedure Example

    Integer eResponse

   

    Move (YesNoCancel_Box("Save the current setup profile?")) to eResponse

 

    If (eResponse = MBR_CANCEL) ;

        Procedure_Return

    If (eResponse = MBR_YES) ;

        Send DoSomething

 

    Send DoSomethingElse

End_Procedure

 

Notes

If the user types Ctrl+C in the message box, the text of the message is copied to the clipboard.