Creates a dummy interface which allows another application's window to be the owner of a CAPI dialog.
The function
make-foreign-owned-interface
creates an instance of foreign-owned-interface.
interface
can be used as the
owner
argument when displaying a dialog. For information about dialog owners, see the "Prompting for Input" chapter in the
CAPI User Guide
.
handle must be supplied and is the window handle (Windows hwnd) of a window in some application. For a CAPI window this window handle can be obtained by simple-pane-handle. For non-CAPI applications, the method of finding the window handle will depend on the language and the way windows are represented, so you should consult the appropriate documentation.
name becomes the name of interface , and has no other meaning.
make-foreign-owned-interface
is implemented only on Microsoft Windows.
This example shows how a CAPI window can be the owner of a dialog in another LispWorks image.
*
.
(capi:simple-pane-handle *)
. The returned value is the window handle, it should be an integer. Denote this value by
hwnd
.Start another LispWorks for Windows image (do not quit the first image). In the Listener of this second LispWorks image:
(setq foi (capi:make-foreign-owned-interface :handle
hwnd
)).
(capi:prompt-for-color "Color?" :owner foi)
.Now note that the Color dialog is owned by the Listener of the first LispWorks image.
CAPI Reference Manual - 15 Dec 2011