riched20: Handle WM_DESTROY in the host.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2021-03-11 08:51:00 +00:00 committed by Alexandre Julliard
parent 7ea3993284
commit 64bbbda2fd
2 changed files with 4 additions and 3 deletions

View File

@ -4277,9 +4277,6 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
}
case WM_CREATE:
return ME_WmCreate(editor, lParam, unicode);
case WM_DESTROY:
ME_DestroyEditor(editor);
return 0;
case WM_SETCURSOR:
{
POINT cursor_pos;

View File

@ -780,6 +780,10 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
editor = host->editor;
switch (msg)
{
case WM_DESTROY:
ITextHost_Release( &host->ITextHost_iface );
return 0;
case WM_ERASEBKGND:
{
HDC hdc = (HDC)wparam;