Silverfrost Forums

Welcome to our forums

multiple simpleplot windows

7 Sep 2005 12:44 #324

Hi,

It took a bit to respond to your suggestion to do all simpleplot in %pl (I was busy changing all my code), so I think the last part of my question got lost. How can I get multiple simpleplots open in MIDI or child or whatever? A brief code fragment would be very helpful as I've tried most everything I can think of.

Thanks for your time.

Bruce

Bruce Weaver

8 Sep 2005 12:08 #327

Here is an outline for a MDI program. You can replace %cw and %gr by %pl....

  winapp

c-------------------------------------------------------------- include <windows.ins> integer i,c0,c1,c2,h1,h2,cwh1 logical L common h1,h2 external child_func

  i=winio@('%ww[no_border]%ca[MDI frame]&')
  i=winio@('%mn[&Child]&',child_func)
  i=winio@('%pv%fr&',400,400)
  i=winio@('%lw',c0)

  i=winio@('%aw&',c0)
  i=winio@('%ww[no_border]%ca[First Child]&')
  i=winio@('%sm[&Child]&',child_func)
  i=winio@('%pv%30.3`cw[hscroll,vscroll]&',7,cwh1)
  i=winio@('%lw&',c1)
  i=winio@('%hw',h1)

  call set_max_lines@(cwh1,50L)
  write(7,*) 'Hello there!'

  i=winio@('%aw&',c0)
  i=winio@('%ww[no_border]%ca[Second Child]&')
  i=winio@('%pv%gr[black,metafile_resize]&',200,200)
  i=winio@('%lw&',c2)
  i=winio@('%hw',h2)

  call ellipse@(100,100,50,50,14)
  L=BringWindowToTop(h1)

  end

C-------------------------------------------- integer function child_func() include <clearwin.ins>

  integer h,hh,i
  integer h1,h2
  common h1,h2

  h=clearwin_info@('FOCUS_WINDOW')
  hh=0
  if(h.eq.h1) hh=1
  if(h.eq.h2) hh=2
  if(hh.gt.0) then
    i=winio@('Window %wd is active %2nl%cn%`7bt[OK]',hh)
  endif

  child_func=1
  end
Please login to reply.