Commit 5c997de8 authored by Evan Tang's avatar Evan Tang Committed by Alexandre Julliard

riched20: Don't emit EN_CHANGE events during window creation.

parent 0b069106
......@@ -8949,7 +8949,7 @@ static void test_init_messages(void)
ok(parent != 0, "Failed to create parent window\n");
change_received = FALSE;
edit = new_window("RichEditWithEvents", 0, parent);
todo_wine ok(change_received == FALSE, "Creating a RichEdit should not make any EN_CHANGE events\n");
ok(change_received == FALSE, "Creating a RichEdit should not make any EN_CHANGE events\n");
DestroyWindow(edit);
DestroyWindow(parent);
}
......
......@@ -1142,6 +1142,7 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
WCHAR *textW = NULL;
LONG codepage = unicode ? CP_UNICODE : CP_ACP;
int len;
LRESULT evmask;
ITextServices_OnTxInPlaceActivate( host->text_srv, NULL );
......@@ -1150,7 +1151,10 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam,
text = unicode ? (void *)createW->lpszName : (void *)createA->lpszName;
textW = ME_ToUnicode( codepage, text, &len );
}
ITextServices_TxSendMessage( host->text_srv, EM_GETEVENTMASK, 0, 0, &evmask );
ITextServices_TxSendMessage( host->text_srv, EM_SETEVENTMASK, 0, evmask & ~ENM_CHANGE, &evmask );
ITextServices_TxSetText( host->text_srv, textW );
ITextServices_TxSendMessage( host->text_srv, EM_SETEVENTMASK, 0, evmask, NULL );
if (lparam) ME_EndToUnicode( codepage, textW );
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment