CEdit::GetHandle

Syntax

HANDLE GetHandle() const;

Remarks

Retrieves a handle to the memory currently allocated for a multiple-line edit control. The handle is a local memory handle and may be used by any of the Local Windows memory functions that take a local memory handle as a parameter.

GetHandle is only processed by multiple-line edit controls.

Call GetHandle for a multiple-line edit control in a dialog box only if the dialog box was created with the DS_LOCALEDIT style flag set. If the DS_LOCALEDIT style is not set, you will still get a nonzero return value, but you will not be able to use the returned value.

Return Value

A local memory handle that identifies the buffer that holds the contents of the edit control. If an error occurs, such as sending the message to a single-line edit control, the return value is 0.

See Also

CEdit::SetHandle, EM_GETHANDLE