YesNo_Box

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

Purpose

Displays a dialog box with Yes & No buttons.

Return Type

Integer

Syntax

Use Windows.pkg

 

(YesNo_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

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

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

Examples

Use Windows.pkg

 

Procedure Example

    Integer eResponse

   

    Move (YesNo_Box("Delete this file?", "", MB_DEFBUTTON2)) to eResponse

                     

    If (eResponse = MBR_YES) Begin

        Send DeleteFile

    End                     

End_Procedure

Notes

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