Silverfrost Forums

Welcome to our forums

Is %cc invoked when 'X' is clicked?

29 Mar 2014 3:01 #13903

G'day, folks 😄

Is the %cc call-back function invoked when the 'X' is clicked? That's the (on my Windows) white 'X' on a red background displayed in the extreme right corner of the caption bar.

Eric

29 Mar 2014 7:00 #13904

Eric, %cc starts the callback function before the window is closed. The function for instance may close all files you have used. The return value should be 0. A small example:

WINAPP
PROGRAM TEST

IMPLICIT NONE
INCLUDE <WINDOWS.INS>

external       finish
integer*4      j

j = winio@('%ca[TEST]%cc&',finish)
j = winio@('%`gr[full_mouse_input,rgb_colours]',600L,400L,1L)
end

integer*4 function finish()
!
!
!     close all files etc.
!
!
finish = 0
end

Regards - Wilfried

29 Mar 2014 8:47 #13905

Quoted from Wilfried Linder Eric, %cc starts the callback function before the window is closed.

Thankyou, Wilfried! 😄

Am I correct in assuming that the callback function is started regardless of the manner of closing, be it by clicking on 'X', 'EXIT', etc?

Eric

29 Mar 2014 3:01 #13906

Yes, you're right. See also this link:

http://www.silverfrost.com/ftn95-help/clearwinp/d8attrib/closurecontrolformat__cc.aspx

Wilfried

Please login to reply.