Silverfrost Logo About Us | Contact Us
 

Attach window - %aw

%aw attaches the window as an MDI child of a parent. The parent must contain an MDI frame (%fr). %aw takes an INTEGER argument that is a control variable attached to the parent window (the parent must already exist). If the parent window does not use %lw, and therefore does not have a control variable, use %cv (see above) in the parent window. In general the child window should have a caption so that it can be moved, maximised, minimised, etc. within the frame. This means that you should not use the %ww no_caption option in this context.

The following code provides the basis of a simple "multipad" editor using %fr and %aw.

  WINAPP
  INTEGER ctrl,winio@
  EXTERNAL open_func
  CHARACTER*128 fname
  COMMON ctrl
  fname='*.for'
  i=winio@('%ww[no_border]&')
  i=winio@('%mn[&File[&Open]]&',
+   'FILE_OPENR[Open]',fname,'+',open_func,'EDIT_FILE',fname)
  i=winio@('%mn[[E&xit]]&','EXIT')
  i=winio@('%pv%fr&',400L,300L)
  i=winio@('%lw',ctrl)
  END
  INTEGER FUNCTION open_func()
  COMMON ctrl
  INTEGER ctrl,winio@
  i=winio@('%pv%aw&',ctrl)
  i=winio@('%20.8eb[no_border]','*',0L)
  open_func=1
  END

Details of the standard call-back functions FILE_OPENR, +, EDIT_FILE, and EXIT are given in Standard call-back functions.

 

 

Copyright © 1999-2017 Silverfrost Limited