CEdit::GetHandle

HLOCAL GetHandle( ) const;

Return Value

A local memory handle that identifies the buffer holding 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.

Remarks

Call this function to retrieve 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 processed only 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.

Note   GetHandle will not work with Windows 95.  If you call GetHandle in Windows 95, it will return NULL. GetHandle will work as documented under Windows NT, versions 3.51 and later.

For more information, see EM_GETHANDLE in the Win32 documentation.

CEdit OverviewClass MembersHierarchy Chart

See Also   CEdit::SetHandle