Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall T_TXTRD(channel, entry_name, control, text, array_size, lines_read)
The channel on which the window library is opened. (n)
The identifier (name) under which the text is stored in the library. (a)
One of the following processing controls on entry: D_FIRST to start with the first line or D_NEXT to continue with line after last read. (n)
The first element of the text array into which to read lines. (a)
The dimension of text. (n)
Returned with the number of lines read. If zero, there are no more lines. (n)
T_TXTRD reads lines of text from a window library text entry created using T_TXTWRT.
The channel must be opened in update mode. This allows T_TXTRD to modify the control record in order to maintain read context within the text entry.
Control is returned with a value of D_NOFIND (defined in tools.def) if the specified entry does not exist. D_NOFIND is a negative number, so you can test for an error by checking whether control is less than zero.
This example reads the first 10 lines from the window “menuhelp” in the window library opened on g_utlib and stores them into the variable helptxt. If “menuhelp” is not found, ctrl is returned as D_NOFIND.
ctrl = D_FIRST xcall t_txtrd(g_utlib, "menuhelp", ctrl, helptxt, 10, rdsiz)