View previous topic :: View next topic |
Author |
Message |
eric_carwardine
Joined: 13 Jun 2009 Posts: 70 Location: Perth, Western Australia
|
Posted: Sat Mar 29, 2014 4:01 am Post subject: Is %cc invoked when 'X' is clicked? |
|
|
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 |
|
Back to top |
|
|
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: Düsseldorf, Germany
|
Posted: Sat Mar 29, 2014 8:00 am Post subject: |
|
|
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:
Code: | 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 |
|
Back to top |
|
|
eric_carwardine
Joined: 13 Jun 2009 Posts: 70 Location: Perth, Western Australia
|
Posted: Sat Mar 29, 2014 9:47 am Post subject: Re: |
|
|
Wilfried Linder wrote: | 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 |
|
Back to top |
|
|
Wilfried Linder
Joined: 14 Nov 2007 Posts: 314 Location: Düsseldorf, Germany
|
|
Back to top |
|
|
|