WinName A string literal (without quotes) representing the name of a window, or an at-sign followed by the name of a local variable (@name) where the value of that variable is expected to be equal to the name of a window at run-time.
Parameters Either an expression or a period, followed by the name of an (unsubscripted) array (similar to an array passed "by reference" to a subroutine or function). When the name of an array is specified, this array can contain both input and output variables stored in named subnodes. Within the called window the array is accessed using the macro %%IOVar. Any structure may be manipulated in this array.
Settings An expression or array containing
properties and settings which will override property settings
already in the window. Format alternatives are:
The macro %%DoWin causes a window to be loaded, if necessary, makes it visible, sets the focus to the starting control, if any, and executes the window by calling its compiled window program. The window need not have first been loaded or opened, %%DoWin includes %%OpenWin. However a window may be preloaded invisible using %%OpenWin so that it appears quickly when %%DoWin is called. In this case it must also be created with the Modal property equal to APPLICATION unless the window is being called as the first GUI operation of the M process.
%%DoWin(Edit,.P,"Parent=%%CurrWin| Color=%%Cyan|PosTop=5|PosLeft=20")
Invoke the window called "Edit",
send and return parameters in the array P(),
use indicated settings for the window properties.
Kill Settings
Set Settings("Parent")=%%CurrWin
Set Settings("Color")=%%Cyan
Set Settings("PosTop")=5
Set Settings("PosLeft")=20
Set Settings("C","TextBox1","VALUE")="Sample value"
Set Settings("C","TextBox1","FCOLOR")=%%Red
%%DoWin(Edit,.P,.Settings)
Invoke the window called "Edit",
send and return parameters in the array P(),
use indicated settings from the array Settings.
In addition to the previous example, several attributes
of a component are defined in this case.
%%DoWin(@EDIT,.P,.PROP)
Invoke the window identified by variable EDIT,
use the array P() for parameters, get settings out of
the array PROP().