U_LDWND
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
xcall U_LDWND(window_id, [channel], window_name, [D_NOPLC], [search], [error] & [, saved_name], {reserved})
Arguments
window_id
Returned with the ID of the window. (n)
channel
(optional) The channel of the window library. (n)
window_name
The name of the window to load. (a)
D_NOPLC
(optional) The no-placement flag. If passed, the window is not placed on the screen. (n)
search
(optional) The search variable. (n)
error
(optional) The error return variable. (n)
saved_name
(optional) The name of the window when it was originally saved. (a)
{reserved}
Reserved for internal use. (n)
Discussion
U_LDWND loads a window from a window library.
Use U_LDWND to load text windows, selection windows, or general windows from a window library. Use I_LDINP to load input windows, and M_LDCOL to load menu columns. Lists must be created using L_CREATE, although you can load the list class into memory with U_LDWND.
If channel is not passed, g_utlib will be used.
If you pass a null string (“ ”) for window_name, Toolkit assigns a unique window name in the form _W_nnn, where nnn is the window ID. You must pass saved_name in this case.
If you want to create multiple instances of the same window, you can call U_LDWND as many times as you need, using window_name to give each succeeding window a new unique name. You must also pass saved_name if window_name is different than the name under which the window was saved.
To create another instance of the same window, pass “” for window_name. You must pass saved_name in this case. A window name is automatically generated for you.
If search is present, U_LDWND searches for an existing window with the specified name before attempting to load the window. If the window is found, a successful load is simulated, window_id is set to the ID of the window that was found, and the search variable is set to true. If the window is not found, the search variable is cleared and the load continues normally.
If error is present, it will be returned with a zero (0) if the requested window was found in the specified library or a non-zero value (the error code number) if the window was not found. A fatal error occurs if error is not present and the window cannot be found; we recommend that you pass it.
See also
- I_LDINP routine for loading input windows
- M_LDCOL routine for loading menu columns
- L_CREATE routine for creating lists
Examples
The first example loads a window with the name in wndname(i) from the window library on the channel stored in chnl, and returns the ID to wndid(i). This window will not be placed on the screen. Sts is the error variable and is returned with a value of 0 if the operation is successful.
xcall u_ldwnd(wndid(i), chnl, wndname(i), D_NOPLC,, sts)
The second example loads the window whose name is “password” from the library on the channel stored in chnl, and returns the ID to passid. The routine will look for an existing window named “password” before loading. Again, sts is the error variable. The window is placed on the screen.
xcall u_ldwnd(passid, chnl, "password",, found, sts)