 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Shahram
Joined: 13 May 2013 Posts: 25
|
Posted: Sun Sep 08, 2013 4:48 pm Post subject: Problem with closing a child window |
|
|
I have opened a window for plotting purposes by the following routine:
Code: | i=winio@('%ca@&',STDIS(NONLINEPL))
i=winio@('%mi[icon_1]&')
i=winio@('%ww[no_border,topmost]&')
......
......
......
i=winio@('%nl%nl%nl%nl%nl%nl%dd%^`4rd&',SCALESTEP(NONLINEPL),scaleminpl1(NONLINEPL),setpl)
i=winio@('%hw&',hwndchild)
i=winio@('%cc&',ex_funplot)
i=winio@('%pv%lw',ctrl1)
i=winio@('%`gr[white,rgb_colours]&',180L,160L,IDGR)
!
IHWPLOT(NONLINEPL)=HWNDCHILD
IDGRPLOT(NONLINEPL)=IDGR |
I would like to close these windows automatically using their related numbers that are saved in common blocks by the followings:
Code: | integer function ex_funplot()
INCLUDE <WINDOWS.INS>
! COMMON /ONLINEPLOT0/ NONLINEPL
COMMON /ONLINEPLOT3/ IHWPLOT( 21),IDGRPLOT( 21)
INTEGER*4 IHWPLOT,IHW,IDGRPLOT
COMMON /ONLINEPLOT1/ IPLOTVOLTB(1800),IPLOTVOLTG( 399),IPLOTVOLTM( 615),IPLOTVOLTL(2,2730)
INTEGER*2 IPLOTVOLTB,IPLOTVOLTG,IPLOTVOLTM,IPLOTVOLTL
COMMON /ONLINEPLOT7/ IPLOTVOLTRETURN( 21),IDLOTVOLTRETURN( 21)
COMMON /TEACHERPLOT1/ ITE,IC,IROU
INTEGER*4 ITE,IROU,IC
IROU=2
IF(ITE.EQ.2)THEN
I=INTS(IC)
GOTO 50
ENDIF
IHW = clearwin_info@('FOCUS_WINDOW')
DO 10 I=1,( 21)
IF(IHW.EQ.IHWPLOT(I))GOTO 50
10 CONTINUE
GOTO 200
50 IHWPLOT(I)=0
NONLINEPL=IDGRPLOT(I)-1000
ID=IDLOTVOLTRETURN(NONLINEPL)
IS=IPLOTVOLTRETURN(NONLINEPL)
IF(ID.GE.1)THEN
IPLOTVOLTB(IS)=0
ELSEIF(ID.GE.7)THEN
IPLOTVOLTG(IS)=0
ELSEIF(ID.GE.13)THEN
IPLOTVOLTM(IS)=0
ELSEIF(ID.GE.19)THEN
IPLOTVOLTL(1,IS)=0
ELSEIF(ID.GE.25)THEN
IPLOTVOLTL(2,IS)=0
ENDIF
IDGRPLOT(I)=0
! 14 NONLINEPL=NONLINEPL-1
IF(ITE.EQ.2)GOTO 200
IC=I
call teachstudplots
200 ex_funplot=0
end |
What routine should I use. I have tested many routines for this purpose but none of them worked. |
|
Back to top |
|
 |
IanLambley
Joined: 17 Dec 2006 Posts: 506 Location: Sunderland
|
Posted: Sun Sep 08, 2013 8:06 pm Post subject: |
|
|
Make sure ctrl1 is integer*4
Put it in a common block so you can access it. To close window set it to zero and
Call window_update@(ctrl1) |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Sun Sep 08, 2013 8:14 pm Post subject: |
|
|
Ian is right. There are other more elaborate ways, and these can be used to close windows in other self-contained applications.
I noted your %nl%nl etc. You could use (say) %5nl
Eddie |
|
Back to top |
|
 |
|
|
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
|