Commit db094db8 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

riched20: Don't return DLGC_HASSETSEL from WM_GETDLGCODE if the control style includes ES_SAVESEL.

parent 5963d7f0
......@@ -3142,11 +3142,14 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
return ME_StreamOut(editor, wParam, (EDITSTREAM *)lParam);
case WM_GETDLGCODE:
{
UINT code = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL;
UINT code = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS;
if (lParam)
editor->bDialogMode = TRUE;
if (editor->styleFlags & ES_MULTILINE)
code |= DLGC_WANTMESSAGE;
if (!(editor->styleFlags & ES_SAVESEL))
code |= DLGC_HASSETSEL;
return code;
}
case EM_EMPTYUNDOBUFFER:
......
......@@ -6729,6 +6729,16 @@ static void test_WM_GETDLGCODE(void)
ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n",
res, expected);
DestroyWindow(hwnd);
hwnd = CreateWindowExA(0, RICHEDIT_CLASS20A, NULL,
WS_POPUP|ES_SAVESEL,
0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL);
ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS20A, (int) GetLastError());
res = SendMessageA(hwnd, WM_GETDLGCODE, 0, 0);
expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS;
ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n",
res, expected);
DestroyWindow(hwnd);
}
static void test_zoom(void)
......
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