Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter NineDialog Functions (continued)

DialogSetReturnValue Function

Overview

The DialogSetReturnValue function sets the return value for a single page (basic) dialog or property sheet and forces the dialog to close.

Syntax/Parameters

Syntax

int = DialogSetReturnValue ( dword code );

Parameters

code

A dword (or int) representing the code to return. Programmers should not use the value -1 since that value is ambiguous with the internal SDK return value which will then be interpreted as a resource or other error.

Return Value

Returns an int value as ERROR_NONE or a formatted error code. Use the GetLastError function to retrieve error information.

Remarks

If the function is successful, an internal flag will be set and the dialog will be closed after the current event procedure completes.

Note that when this function is used, it sets an internal flag and inhibits the post processing of the return code value from a dialog. For example, in normal operation, pressing the OK or Cancel button will return a 1 or 2 value respectively but the dialog post processor will translate that into ERROR_NONE or ERROR_CANCEL, respectively. It is not advisable to use this function to return normal ok/cancel values since using the IsError function will not operate on the value of 2 to stop an operation.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic