MSM-Workstation
Macros

Go back to the alphabetic list of macros
Go back to the first page of this tutorial

%%OpenWin ( WinName [ , Parameters [ , Settings ] ] )

Load a window into memory.

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.

When invoking a window through the %%OpenWin macro (rather than through %%Do or %%DoWin), the array's contents are presented only to the Create sections of window and control action logic.

Settings An expression or array containing properties and settings which will override property settings already in the window. Format alternatives are listed under %%DoWin. %%OpenWin creates the window, applying any values in Parameters during the load. It then performs any window and control Create logic. Settings may be used to set properties like Visible=0 (if it is desired to load the window without displaying).

%%OpenWin does not set focus onto the window. It returns focus to the calling entity, immediately after the creation has completed. Once a window has been created with through the %%OpenWin macro, subsequent use of the macro %%OpenWin on the same window has no effect until the window is removed using the macro %%CloseWin.

Examples

%%OpenWin(Main,,%%CurrWin)
Open the window called "Main" with the current window as its parent. Perform the Create logic for that window als all its controls and then return to the entity from which the code generated by this macro was executed.

See also

%%DoWin and %%CloseWin.