EM_SETHANDLE

This message establishes the text buffer used to hold the contents of the control window.

Parameters

wParam

Contains a handle to the buffer. The handle must be a local handle to a location in the application's linear address space. The edit control uses this buffer to store the currently displayed text, instead of allocating its own buffer. If necessary, the control reallocates this buffer.

lParam

This parameter is not used.

Comments

This message will not be processed by single-line edit controls.

If the EM_SETHANDLE message is used to change the text buffer used by an edit control, the previous text buffer is not destroyed. The application must retrieve the previous buffer handle before setting the new handle, and must free the old handle by using the LocalFree function.

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.

See Also

LocalFree