Something changed after 8.71 (scc_lib version=18664).
Previously, when a %mn callback is processed, the return value can be used to terminate the parent window. The following code illustrates this. Clicking on the %mn causes the callback function to execute and begin counting down the value that is also returned through the callback. Once it reaches 0, I decrement it yet again to make sure it is -1 or less. When this happens, the parent window does not close, as it should. When the window is manualy closed, the last value returned from the callback function is returned (as the absolute value), and displayed.
This code was compiled using all the latest DLL's, compiler, etc.
winapp
program main
integer,external:: run1
integer:: ret_val
common/dataishere/ret_val
data ret_val/5/
i=winio@('%mn[Change]&',run1)
i=winio@('%`rd', ret_val)
print *,i
end
integer function run1()
use mswin
integer:: ret_val
common/dataishere/ret_val
ret_val = ret_val - 1
if(ret_val.eq.0)ret_val = ret_val - 1
call window_update@(ret_val)
run1 = ret_val
return
end