Run-Time Subroutine: Sets the return value for the DLGMODAL function from within a callback subroutine.
Module: USE DFLOGM
Syntax
DLGSETRETURN overrides the default return value with retval. You can set your own value as a means of determining the condition under which the dialog box was closed. The default return value for an error condition is -1, so you should not use -1 as your return value.
DLGSETRETURN should be called from within a callback routine, and is generally used with DLGEXIT, which causes the dialog box to be exited from a control callback rather than the user selecting the OK or Cancel button.
Compatibility
CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB
Example
SUBROUTINE SETRETSUB (dlg, button_id, callbacktype)
USE DFLOGM
INCLUDE "MYDLG.FD"
TYPE (DIALOG) dlg
LOGICAL is_checked, retlog
INTEGER return, button_id, callbacktype
...
retlog = DLGGET(dlg, IDC_CHECKBOX4, is_checked, dlg_state)
IF (is_checked) THEN
return = 999
ELSE
return = -999
END IF
CALL DLGSETRETURN (dlg, return)
CALL DLGEXIT (dlg)
END SUBROUTINE SETRETSUB