Silverfrost Forums

Welcome to our forums

Closing window

8 Nov 2016 5:08 #18338

I have created a logging window using the %lw and %cc formats. The logging window reports the progress on a long running number crunching process. Everything works fine when the X box in right hand corner of window is pressed and the call-back function associated with the %cc is executed. However, Alt-F4 or 'Close' on the main-menu does not close the window as the X box does. What is up? Thanks. Regards, Tom Bellissimo

9 Nov 2016 8:02 #18340

Tom

Could you post a simple program that illustrates this issue please.

9 Nov 2016 5:15 #18341

Paul, Here is the code I use to create the logging window.....

      i=WINIO@('%fn[Arial Rounded MT Bold]%ts&',.95D0)
      i=WINIO@('%ca[RTSim 32-bit Logging Window]%ns'//
 +    '%ww[no_minbox,no_maxbox]%mi[RTCase_icon]'//
 +    '%ffStart Time: %ws, '//
 1    '%ws%ff%nl%tc[red]Currently Simulating................%tc%ff'
 2    //'%nl%ob[thin_panelled]%`rs%ffYear: %`4rd   Month: %`2rd'
 3    //'%nl%nlCurrent Try: %`rd%nl%nl%20br%cb%lw%cc',
 4    start_date,start_time,-1L,CaseLoopCase,
 5    CaseLoopYr,CaseLoopMon,NumOptiTries_win,
 6    ProcessBar,RGB@(255,255,0),ictrl,LogWinExit)

Tom

9 Nov 2016 5:23 #18342

Paul, Depressing the X box in right hand corner of the logging window terminates the window and causes the call-back function LogWinExit to be executed. However, Alt-F4 or 'Close' on the main-menu does not close the window.

Tom

9 Nov 2016 6:50 #18345

Tom

Here is my test program that works correctly for me. If it works OK for you then you can extend it step by step to what you need.

program main
integer i,winio@,ictrl
integer,external::LogWinExit
i=winio@('%ww[no_minbox,no_maxbox]&')
i=winio@('%ca[Testing]&')
i=winio@('%ffTesting&') 
i=winio@('%lw%cc',ictrl,LogWinExit) 
end program main

integer function LogWinExit()
LogWinExit = 0
end function LogWinExit
Please login to reply.