You can test whether the interface in which a pane is contained is visible by calling interface-visible-p.
(setf (top-level-interface-display-state interface) :iconic)
You can also make it be hidden, maximized or restore it to normal, and you have the option to create it in one of these states initially. For the details see top-level-interface-display-state.
You can test whether an interface is iconified by calling interface-iconified-p.
To close a CAPI interface window unconditionally, call the generic function destroy.
To close a CAPI interface window such that its confirm-destroy-function is called first to allow the user to confirm, call quit-interface. You must call it in the window's process, for example in the callback of a menu item.
You can use the function locate-interface to find an interface of a specified class which is currently displayed. It uses the method interface-match-p to decide if there is any "matching" interface, in which case that is simply returned, otherwise it uses interface-reuse-p to decide if any instance of the class can be reused, in which case it reinitializes it using reinitialize-interface and returns it.
You can call collect-interfaces to obtain a list of displayed interfaces of a specific class.
It is possible to switch off locating of interfaces by calling
(setf reuse-interfaces-p). This causes locate-interface to always return
nil, and hence find-interface will always create new interface.
The IDE uses a different switch for its own interfaces, which can be set from the
You can save a session in the LispWorks IDE, either programmatically by
hcl:save-current-session or interactively from the
menu. If you integrate your own interfaces with the LispWorks IDE and want associated information to be preserved over session saving, you can define interface-preserve-state methods on your own interfaces. You can also use interface-preserving-state-p in the
and interface-display methods to check for any destroying/displaying that is performed as part of session saving (as opposed to the normal display/destroy cycle).
CAPI User Guide and Reference Manual (Windows version) - 3 Aug 2017