Upravit

Sdílet prostřednictvím


EM_SETHANDLE message

Sets the handle of the memory that will be used by a multiline edit control.

Parameters

wParam

A handle to the memory buffer the edit control uses to store the currently displayed text instead of allocating its own memory. If necessary, the control reallocates this memory.

lParam

This parameter is not used.

Return value

This message does not return a value.

Remarks

Before an application sets a new memory handle, it should send an EM_GETHANDLE message to retrieve the handle of the current memory buffer and should free that memory.

An edit control automatically reallocates the given buffer whenever it needs additional space for text, or it removes enough text so that additional space is no longer needed.

Sending an EM_SETHANDLE message clears the undo buffer (EM_CANUNDO returns zero) and the internal modification flag (EM_GETMODIFY returns zero). The edit control window is redrawn.

Rich Edit: The EM_SETHANDLE message is not supported. Rich edit controls do not store text as a simple array of characters.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Winuser.h (include Windows.h)

See also

Reference

EM_CANUNDO

EM_GETHANDLE

EM_GETMODIFY