mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 10:36:58 +00:00
riched20: Don't return DLGC_HASSETSEL from WM_GETDLGCODE if the control style includes ES_SAVESEL.
This commit is contained in:
parent
5963d7f09c
commit
db094db851
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue