I've some problems to update an attached window. I've searched in the forum but I found no suitable help. Here, at first, the relevant part of my program: (All data is declared correctly and available)
[color=green]
Main program
...
...
! open MDI-window
i=winio@('%sp&',winx,winy)
i=winio@('%pv%`fr&',winb,winh,ctrl0)
i=winio@('%ca[Darstellung der Berechnungsergebnisse]&')
i=winio@('%hw&',hand0)
i=winio@('%lw[owned]',ctrl_mdi)[/color]
!!!STEP a. plot-data is produced in several subroutines
!!!STEP b. drawing-subroutine is called
SUBROUTINE BI_EI_GI (xdata,ydata,ist,nou)
INCLUDE <windows.ins>
REAL*8 xData(NWDIM,KU),yData(NWDIM,KU) ! KU data sets
REAL*8 winkel
! declare x-y-data for plotting legend and labels
....
....
CALL winop@('%pl[y_min=0.,y_max=1.]')
CALL winop@('%pl[x_min=0.,x_max=0.5]')
CALL winop@('%pl[dy=0.1]')
CALL winop@('%pl[n_graphs=2]')
CALL winop@('%pl[width=2,width=2]')
CALL winop@('%pl[pen_style=0,pen_style=2]')
CALL winop@('%pl[link=lines,link=curves]')
CALL winop@('%pl[colour=red,colour=blue]')
CALL winop@('%pl[symbol_size=2,symbol_size=2]')
CALL winop@('%pl[symbol=0,symbol=11]')
CALL winop@('%pl[gridlines]')
CALL winop@('%pl[x_array]')
!c---Display a window containing the graph.
IF (NOU .EQ. 1) iw0=winio@('%sp&',plox,ployo) !!upper window
IF (NOU .EQ. 2) iw0=winio@('%sp&',plox,ployu) !!lower window
iw0=winio@('%pv%aw&',ctrl_mdi)
iw0=winio@('%ww[no_border]&')
iw0=winio@('%`bg[white]&')
iw0=winio@('%ca@&',USCH(1:LEN_TRIM(USCH)))
iw0=winio@('%pl',plopix,plopiy,ist, &
xData(1:ist,1),yData(1:ist,1),yData(1:ist,2))
CALL draw_characters@(txrt(1:lrt),ihkr,ivv0,RGB@(255,0,0)) !legend
CALL draw_characters@(txbl(1:lbl),ihkb,ivv0,RGB@(0,0,255)) !legend
CALL draw_characters@(titl(NOU)(1:lt),ihlt,ivv1,RGB@(0,0,0)) !plot-title
CALL draw_characters@(x_tex(1:lxx),ihxax,ivxax,RGB@(0,0,0)) !label x-axis
CALL rotate_font@(winkel)
CALL draw_characters@(y_tex(1:lyy),ihyax,ivyax,RGB@(0,0,0)) !label y-axis
RETURN
end subroutine BI_EI_GI
!!!STEP c. new plot-data is created and back to step b. , until limit of iteration is reached [/color]
The program works as desired. Within the mdi-frame two attached windows (upper and lower) show the drawing. But by this course new windows are opened at each call of the subroutine BI_EI_GI. Therefore, at the end of the iteration a lot of windows lay on the screen one upon the other accurately, sometimes 2x20 and more.
A control (iw0=winio@('%lw',ctrl_eiz) or a handle (iw0=winio@('%hw',hndl_eiz) of the current window create both a child-window, which stops the flow.
The aim is, that after the first call of BI_EI_GI the window is updated and not created newly. What have I to do?
