DIALOG GET TEXT statement

Purpose

Retrieve the text in a dialog or window caption.

Syntax

DIALOG GET TEXT hDlg TO titletext$

Remarks

The text of the dialog or window caption specified by hDlg. For DDT dialogs, hDlg is the dialog handle returned by the DIALOG NEW statement. In a dialog Callback Function, the CB.HNDL  function will return the parent dialog handle and this can also be used with DIALOG GET TEXT.

titletext$

The text is returned and placed into the string variable titletext$. If the window or dialog is invalid, titletext$ will be set to an empty string.

Restrictions 

hDlg is a dialog or window handle, so DIALOG GET TEXT works with both DDT dialogs and conventional windows and dialogs.

See also

CB Callback functions, CONTROL GET TEXT, CONTROL SET TEXT, DIALOG NEW, DIALOG SET TEXT

Example

DIALOG GET TEXT hDlg1& TO a$

Result 

Variable a$ contains the caption text of the dialog referenced by hDlg