Happens when somebody wants you to return the text in your window's titlebar.


Args

ARG(1) is (one more than) how many maximum characters you may return.

ARG(2) is where to copy a C string of the text.


Return

The length of the C string you copy to ARG(2).


Notes

To return the text, you must use CONVERTDATA to convert it to a C string, and you may return only as many characters as ARG(1) minus 1:

MyVariable = "My Title"

/* Be sure we don't return more than the max length. */
Size = ARG(1) - 1
IF LENGTH(MyVariable) > Size THEN MyVariable = LEFT(MyVariable, Size)

/* Convert the string to a C string. */
CONVERTDATA(ARG(2), "MyVariable", "str", , "FROM")

/* RETURN how many chars. */
RETURN Size
See also SETTEXT, GETTEXTLENGTH.