forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is %cc invoked when 'X' is clicked?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
eric_carwardine



Joined: 13 Jun 2009
Posts: 70
Location: Perth, Western Australia

PostPosted: Sat Mar 29, 2014 4:01 am    Post subject: Is %cc invoked when 'X' is clicked? Reply with quote

G'day, folks Very Happy

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
View user's profile Send private message Send e-mail Visit poster's website
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Sat Mar 29, 2014 8:00 am    Post subject: Reply with quote

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
View user's profile Send private message
eric_carwardine



Joined: 13 Jun 2009
Posts: 70
Location: Perth, Western Australia

PostPosted: Sat Mar 29, 2014 9:47 am    Post subject: Re: Reply with quote

Wilfried Linder wrote:
Eric, %cc starts the callback function before the window is closed.


Thankyou, Wilfried! Very Happy

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
View user's profile Send private message Send e-mail Visit poster's website
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Sat Mar 29, 2014 4:01 pm    Post subject: Reply with quote

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

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

Wilfried
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group