INF: Freeing Resources Used by a Multiline Edit Control

ID Number: Q74224

3.00 3.10

WINDOWS

Summary:

An application developed for the Microsoft Windows graphical

environment must explicitly free the resources that a multiline edit

control uses in the following two situations:

1. Before sending the edit control a WM_SETHANDLE message to change

the text buffer, the application must first send a WM_GETHANDLE

message to the control to obtain a handle to the existing buffer.

When an application specifies a new text buffer, Windows does not

automatically free the existing buffer. To prevent memory loss, the

application must free the buffer by calling the LocalFree function.

2. If an application creates a font object and uses the WM_SETFONT

message to specify that an edit control should use that font, the

application must call the DeleteObject function to delete the font

object when it is no longer needed.

Additional reference words: 3.00 3.10