Attach window - %aw

In this section:

%aw (Attach MDI Child Window) attaches the window as an MDI child of a parent. The parent must contain an MDI frame (%fr (MDI Frame)). %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 (Leave Window Open), and therefore does not have a control variable, use %cv (Control Variable) 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 (Window Style) no_caption option in this context.

The following code provides the basis of a simple "multipad" editor using %fr (MDI Frame) and %aw (Attach MDI Child Window).

  INTEGER ctrl,winio@
  EXTERNAL open_func
  CHARACTER*128 fname
  COMMON ctrl
+   'FILE_OPENR[Open]',fname,'+',open_func,'EDIT_FILE',fname)
  INTEGER FUNCTION open_func()
  COMMON ctrl
  INTEGER ctrl,winio@

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



Copyright © 1999-2024 Silverfrost Limited