DM_GETTEXT

Far Manager

DM_GETTEXT

The DM_GETTEXT message is sent to the dialog manager to retrieve the text of an edit string or the caption of an item.

Param1

The ID of the dialog item for which you want to retrieve the text.

Param2

Pointer to a FarDialogItemDatastructure that receives the text.
If Param2 is NULL this is yet another way to retrieve necessary data size (see DM_GETTEXTLENGTH):
LenData=SendDlgMessage(hDlg,DM_GETTEXT,1,(LONG_PTR)NULL);
is equal to
LenData=SendDlgMessage(hDlg,DM_GETTEXTLENGTH,1,0);

Return

Data size without terminating character '\0'.

Controls

ControlDescription
All String data for edit lines, captions for other items. Everything contained in FarDialogItem.Data or FarDialogItem.PtrData.

Remarks

The DM_GETTEXT message in FAR versions up to (and including) 1.70 beta 3 returned the size INCLUDING the terminating character.

Example

See also: