Commit 89f88a49 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

richedit: Store an internal copy of the window style flags.

parent 9a902f35
...@@ -57,7 +57,7 @@ int ME_GetTextLengthEx(ME_TextEditor *editor, const GETTEXTLENGTHEX *how) ...@@ -57,7 +57,7 @@ int ME_GetTextLengthEx(ME_TextEditor *editor, const GETTEXTLENGTHEX *how)
length = ME_GetTextLength(editor); length = ME_GetTextLength(editor);
if ((GetWindowLongW(editor->hWnd, GWL_STYLE) & ES_MULTILINE) if ((editor->styleFlags & ES_MULTILINE)
&& (how->flags & GTL_USECRLF) && (how->flags & GTL_USECRLF)
&& !editor->bEmulateVersion10) /* Ignore GTL_USECRLF flag in 1.0 emulation */ && !editor->bEmulateVersion10) /* Ignore GTL_USECRLF flag in 1.0 emulation */
length += editor->nParagraphs - 1; length += editor->nParagraphs - 1;
......
...@@ -2157,7 +2157,6 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey) ...@@ -2157,7 +2157,6 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
{ {
BOOL ctrl_is_down = GetKeyState(VK_CONTROL) & 0x8000; BOOL ctrl_is_down = GetKeyState(VK_CONTROL) & 0x8000;
BOOL shift_is_down = GetKeyState(VK_SHIFT) & 0x8000; BOOL shift_is_down = GetKeyState(VK_SHIFT) & 0x8000;
DWORD dwStyle = GetWindowLongW(editor->hWnd, GWL_STYLE);
if (nKey != VK_SHIFT && nKey != VK_CONTROL && nKey != VK_MENU) if (nKey != VK_SHIFT && nKey != VK_CONTROL && nKey != VK_MENU)
editor->nSelectionType = stPosition; editor->nSelectionType = stPosition;
...@@ -2181,7 +2180,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey) ...@@ -2181,7 +2180,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
case VK_DELETE: case VK_DELETE:
editor->nUDArrowX = -1; editor->nUDArrowX = -1;
/* FIXME backspace and delete aren't the same, they act different wrt paragraph style of the merged paragraph */ /* FIXME backspace and delete aren't the same, they act different wrt paragraph style of the merged paragraph */
if (dwStyle & ES_READONLY) if (editor->styleFlags & ES_READONLY)
return FALSE; return FALSE;
if (ME_IsSelection(editor)) if (ME_IsSelection(editor))
{ {
...@@ -2217,7 +2216,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey) ...@@ -2217,7 +2216,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
ME_SendRequestResize(editor, FALSE); ME_SendRequestResize(editor, FALSE);
return TRUE; return TRUE;
case VK_RETURN: case VK_RETURN:
if (dwStyle & ES_MULTILINE) if (editor->styleFlags & ES_MULTILINE)
{ {
ME_Cursor cursor = editor->pCursors[0]; ME_Cursor cursor = editor->pCursors[0];
ME_DisplayItem *para = ME_GetParagraph(cursor.pRun); ME_DisplayItem *para = ME_GetParagraph(cursor.pRun);
...@@ -2225,7 +2224,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey) ...@@ -2225,7 +2224,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
const WCHAR endl = '\r'; const WCHAR endl = '\r';
ME_Style *style; ME_Style *style;
if (dwStyle & ES_READONLY) { if (editor->styleFlags & ES_READONLY) {
MessageBeep(MB_ICONERROR); MessageBeep(MB_ICONERROR);
return TRUE; return TRUE;
} }
...@@ -2412,7 +2411,7 @@ static LRESULT ME_Char(ME_TextEditor *editor, WPARAM charCode, ...@@ -2412,7 +2411,7 @@ static LRESULT ME_Char(ME_TextEditor *editor, WPARAM charCode,
MultiByteToWideChar(CP_ACP, 0, &charA, 1, &wstr, 1); MultiByteToWideChar(CP_ACP, 0, &charA, 1, &wstr, 1);
} }
if (GetWindowLongW(editor->hWnd, GWL_STYLE) & ES_READONLY) { if (editor->styleFlags & ES_READONLY) {
MessageBeep(MB_ICONERROR); MessageBeep(MB_ICONERROR);
return 0; /* FIXME really 0 ? */ return 0; /* FIXME really 0 ? */
} }
...@@ -2664,6 +2663,11 @@ static ME_TextEditor *ME_MakeEditor(HWND hWnd, BOOL bEmulateVersion10) ...@@ -2664,6 +2663,11 @@ static ME_TextEditor *ME_MakeEditor(HWND hWnd, BOOL bEmulateVersion10)
int i; int i;
ed->hWnd = hWnd; ed->hWnd = hWnd;
ed->bEmulateVersion10 = bEmulateVersion10; ed->bEmulateVersion10 = bEmulateVersion10;
ed->styleFlags = GetWindowLongW(hWnd, GWL_STYLE);
if (ed->styleFlags & WS_VSCROLL)
ed->styleFlags |= ES_AUTOVSCROLL;
if (!ed->bEmulateVersion10 && (ed->styleFlags & WS_HSCROLL))
ed->styleFlags |= ES_AUTOHSCROLL;
ed->pBuffer = ME_MakeText(); ed->pBuffer = ME_MakeText();
ed->nZoomNumerator = ed->nZoomDenominator = 0; ed->nZoomNumerator = ed->nZoomDenominator = 0;
ME_MakeFirstParagraph(ed); ME_MakeFirstParagraph(ed);
...@@ -2698,10 +2702,7 @@ static ME_TextEditor *ME_MakeEditor(HWND hWnd, BOOL bEmulateVersion10) ...@@ -2698,10 +2702,7 @@ static ME_TextEditor *ME_MakeEditor(HWND hWnd, BOOL bEmulateVersion10)
ed->nParagraphs = 1; ed->nParagraphs = 1;
ed->nLastSelStart = ed->nLastSelEnd = 0; ed->nLastSelStart = ed->nLastSelEnd = 0;
ed->pLastSelStartPara = ed->pLastSelEndPara = ME_FindItemFwd(ed->pBuffer->pFirst, diParagraph); ed->pLastSelStartPara = ed->pLastSelEndPara = ME_FindItemFwd(ed->pBuffer->pFirst, diParagraph);
if (ed->bEmulateVersion10) ed->bWordWrap = !(ed->styleFlags & ES_AUTOHSCROLL);
ed->bWordWrap = (GetWindowLongW(hWnd, GWL_STYLE) & ES_AUTOHSCROLL) ? FALSE : TRUE;
else
ed->bWordWrap = (GetWindowLongW(hWnd, GWL_STYLE) & (WS_HSCROLL|ES_AUTOHSCROLL)) ? FALSE : TRUE;
ed->bHideSelection = FALSE; ed->bHideSelection = FALSE;
ed->nInvalidOfs = -1; ed->nInvalidOfs = -1;
ed->pfnWordBreak = NULL; ed->pfnWordBreak = NULL;
...@@ -2716,20 +2717,20 @@ static ME_TextEditor *ME_MakeEditor(HWND hWnd, BOOL bEmulateVersion10) ...@@ -2716,20 +2717,20 @@ static ME_TextEditor *ME_MakeEditor(HWND hWnd, BOOL bEmulateVersion10)
ed->pFontCache[i].nAge = 0; ed->pFontCache[i].nAge = 0;
ed->pFontCache[i].hFont = NULL; ed->pFontCache[i].hFont = NULL;
} }
ME_CheckCharOffsets(ed); ME_CheckCharOffsets(ed);
if (GetWindowLongW(hWnd, GWL_STYLE) & ES_SELECTIONBAR) if (ed->styleFlags & ES_SELECTIONBAR)
ed->selofs = SELECTIONBAR_WIDTH; ed->selofs = SELECTIONBAR_WIDTH;
else else
ed->selofs = 0; ed->selofs = 0;
ed->bDefaultFormatRect = TRUE; ed->bDefaultFormatRect = TRUE;
ed->nSelectionType = stPosition; ed->nSelectionType = stPosition;
if (GetWindowLongW(hWnd, GWL_STYLE) & ES_PASSWORD) if (ed->styleFlags & ES_PASSWORD)
ed->cPasswordMask = '*'; ed->cPasswordMask = '*';
else else
ed->cPasswordMask = 0; ed->cPasswordMask = 0;
ed->notified_cr.cpMin = ed->notified_cr.cpMax = 0; ed->notified_cr.cpMin = ed->notified_cr.cpMax = 0;
/* Default scrollbar information */ /* Default scrollbar information */
...@@ -3039,7 +3040,7 @@ static LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ...@@ -3039,7 +3040,7 @@ static LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
case WM_GETDLGCODE: case WM_GETDLGCODE:
{ {
UINT code = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; UINT code = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL;
if (GetWindowLongW(editor->hWnd, GWL_STYLE) & ES_MULTILINE) if (editor->styleFlags & ES_MULTILINE)
code |= DLGC_WANTMESSAGE; code |= DLGC_WANTMESSAGE;
return code; return code;
} }
...@@ -3089,7 +3090,7 @@ static LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ...@@ -3089,7 +3090,7 @@ static LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
/* these flags are equivalent to the ES_* counterparts */ /* these flags are equivalent to the ES_* counterparts */
DWORD mask = ECO_VERTICAL | ECO_AUTOHSCROLL | ECO_AUTOVSCROLL | DWORD mask = ECO_VERTICAL | ECO_AUTOHSCROLL | ECO_AUTOVSCROLL |
ECO_NOHIDESEL | ECO_READONLY | ECO_WANTRETURN | ECO_SELECTIONBAR; ECO_NOHIDESEL | ECO_READONLY | ECO_WANTRETURN | ECO_SELECTIONBAR;
DWORD settings = GetWindowLongW(editor->hWnd, GWL_STYLE) & mask; DWORD settings = editor->styleFlags & mask;
return settings; return settings;
} }
...@@ -3101,8 +3102,7 @@ static LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ...@@ -3101,8 +3102,7 @@ static LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
*/ */
DWORD mask = ECO_VERTICAL | ECO_AUTOHSCROLL | ECO_AUTOVSCROLL | DWORD mask = ECO_VERTICAL | ECO_AUTOHSCROLL | ECO_AUTOVSCROLL |
ECO_NOHIDESEL | ECO_READONLY | ECO_WANTRETURN | ECO_SELECTIONBAR; ECO_NOHIDESEL | ECO_READONLY | ECO_WANTRETURN | ECO_SELECTIONBAR;
DWORD raw = GetWindowLongW(editor->hWnd, GWL_STYLE); DWORD settings = mask & editor->styleFlags;
DWORD settings = mask & raw;
DWORD oldSettings = settings; DWORD oldSettings = settings;
DWORD changedSettings; DWORD changedSettings;
...@@ -3120,14 +3120,17 @@ static LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ...@@ -3120,14 +3120,17 @@ static LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
case ECOOP_XOR: case ECOOP_XOR:
settings ^= lParam; settings ^= lParam;
} }
SetWindowLongW(editor->hWnd, GWL_STYLE, (raw & ~mask) | (settings & mask));
changedSettings = oldSettings ^ settings; changedSettings = oldSettings ^ settings;
if (settings & ECO_AUTOWORDSELECTION) if (settings & ECO_AUTOWORDSELECTION)
FIXME("ECO_AUTOWORDSELECTION not implemented yet!\n"); FIXME("ECO_AUTOWORDSELECTION not implemented yet!\n");
if (oldSettings ^ settings) { if (oldSettings ^ settings) {
DWORD dwStyle = GetWindowLongW(editor->hWnd, GWL_STYLE);
editor->styleFlags = (editor->styleFlags & ~mask) | (settings & mask);
SetWindowLongW(editor->hWnd, GWL_STYLE, (dwStyle & ~mask) | (settings & mask));
if (settings & ECO_SELECTIONBAR) { if (settings & ECO_SELECTIONBAR) {
editor->selofs = SELECTIONBAR_WIDTH; editor->selofs = SELECTIONBAR_WIDTH;
editor->rcFormat.left += SELECTIONBAR_WIDTH; editor->rcFormat.left += SELECTIONBAR_WIDTH;
...@@ -3287,12 +3290,15 @@ static LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ...@@ -3287,12 +3290,15 @@ static LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
} }
case EM_SETREADONLY: case EM_SETREADONLY:
{ {
long nStyle = GetWindowLongW(editor->hWnd, GWL_STYLE); LONG winStyle = GetWindowLongW(editor->hWnd, GWL_STYLE);
if (wParam) if (wParam) {
nStyle |= ES_READONLY; editor->styleFlags |= ES_READONLY;
else winStyle |= ES_READONLY;
nStyle &= ~ES_READONLY; } else {
SetWindowLongW(editor->hWnd, GWL_STYLE, nStyle); editor->styleFlags &= ~ES_READONLY;
winStyle &= ~ES_READONLY;
}
SetWindowLongW(editor->hWnd, GWL_STYLE, winStyle);
return 0; return 0;
} }
case EM_SETEVENTMASK: case EM_SETEVENTMASK:
...@@ -3484,7 +3490,7 @@ static LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ...@@ -3484,7 +3490,7 @@ static LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
int len = -1; int len = -1;
/* uses default style! */ /* uses default style! */
if (!(GetWindowLongW(editor->hWnd, GWL_STYLE) & ES_MULTILINE)) if (!(editor->styleFlags & ES_MULTILINE))
{ {
WCHAR * p; WCHAR * p;
...@@ -3877,7 +3883,7 @@ static LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ...@@ -3877,7 +3883,7 @@ static LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
si.cbSize = sizeof(si); si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE; si.fMask = SIF_PAGE | SIF_RANGE;
if (GetWindowLongW(editor->hWnd, GWL_STYLE) & ES_DISABLENOSCROLL) if (editor->styleFlags & ES_DISABLENOSCROLL)
si.fMask |= SIF_DISABLENOSCROLL; si.fMask |= SIF_DISABLENOSCROLL;
si.nMax = (si.fMask & SIF_DISABLENOSCROLL) ? 1 : 0; si.nMax = (si.fMask & SIF_DISABLENOSCROLL) ? 1 : 0;
si.nMin = 0; si.nMin = 0;
......
...@@ -330,6 +330,7 @@ typedef struct tagME_TextEditor ...@@ -330,6 +330,7 @@ typedef struct tagME_TextEditor
BOOL bEmulateVersion10; BOOL bEmulateVersion10;
ME_TextBuffer *pBuffer; ME_TextBuffer *pBuffer;
ME_Cursor *pCursors; ME_Cursor *pCursors;
DWORD styleFlags;
int nCursors; int nCursors;
SIZE sizeWindow; SIZE sizeWindow;
int nTotalLength, nLastTotalLength; int nTotalLength, nLastTotalLength;
......
...@@ -1063,13 +1063,13 @@ void ME_ScrollAbs(ME_TextEditor *editor, int x, int y) ...@@ -1063,13 +1063,13 @@ void ME_ScrollAbs(ME_TextEditor *editor, int x, int y)
winStyle = GetWindowLongW(editor->hWnd, GWL_STYLE); winStyle = GetWindowLongW(editor->hWnd, GWL_STYLE);
bScrollBarIsVisible = (winStyle & WS_HSCROLL) != 0; bScrollBarIsVisible = (winStyle & WS_HSCROLL) != 0;
bScrollBarWillBeVisible = (editor->nTotalWidth > editor->sizeWindow.cx) bScrollBarWillBeVisible = (editor->nTotalWidth > editor->sizeWindow.cx)
|| (winStyle & ES_DISABLENOSCROLL); || (editor->styleFlags & ES_DISABLENOSCROLL);
if (bScrollBarIsVisible != bScrollBarWillBeVisible) if (bScrollBarIsVisible != bScrollBarWillBeVisible)
ShowScrollBar(editor->hWnd, SB_HORZ, bScrollBarWillBeVisible); ShowScrollBar(editor->hWnd, SB_HORZ, bScrollBarWillBeVisible);
bScrollBarIsVisible = (winStyle & WS_VSCROLL) != 0; bScrollBarIsVisible = (winStyle & WS_VSCROLL) != 0;
bScrollBarWillBeVisible = (editor->nTotalLength > editor->sizeWindow.cy) bScrollBarWillBeVisible = (editor->nTotalLength > editor->sizeWindow.cy)
|| (winStyle & ES_DISABLENOSCROLL); || (editor->styleFlags & ES_DISABLENOSCROLL);
if (bScrollBarIsVisible != bScrollBarWillBeVisible) if (bScrollBarIsVisible != bScrollBarWillBeVisible)
ShowScrollBar(editor->hWnd, SB_VERT, bScrollBarWillBeVisible); ShowScrollBar(editor->hWnd, SB_VERT, bScrollBarWillBeVisible);
...@@ -1119,7 +1119,7 @@ void ME_UpdateScrollBar(ME_TextEditor *editor) ...@@ -1119,7 +1119,7 @@ void ME_UpdateScrollBar(ME_TextEditor *editor)
si.cbSize = sizeof(si); si.cbSize = sizeof(si);
si.fMask = SIF_PAGE | SIF_RANGE | SIF_POS; si.fMask = SIF_PAGE | SIF_RANGE | SIF_POS;
if (GetWindowLongW(editor->hWnd, GWL_STYLE) & ES_DISABLENOSCROLL) if (editor->styleFlags & ES_DISABLENOSCROLL)
si.fMask |= SIF_DISABLENOSCROLL; si.fMask |= SIF_DISABLENOSCROLL;
/* Update horizontal scrollbar */ /* Update horizontal scrollbar */
......
...@@ -1478,7 +1478,7 @@ static void test_EM_SETOPTIONS(void) ...@@ -1478,7 +1478,7 @@ static void test_EM_SETOPTIONS(void)
RICHEDIT_CLASS, (int) GetLastError()); RICHEDIT_CLASS, (int) GetLastError());
options = SendMessage(hwndRichEdit, EM_GETOPTIONS, 0, 0); options = SendMessage(hwndRichEdit, EM_GETOPTIONS, 0, 0);
/* WS_[VH]SCROLL cause the ECO_AUTO[VH]SCROLL options to be set */ /* WS_[VH]SCROLL cause the ECO_AUTO[VH]SCROLL options to be set */
todo_wine ok(options == (ECO_AUTOVSCROLL|ECO_AUTOHSCROLL), ok(options == (ECO_AUTOVSCROLL|ECO_AUTOHSCROLL),
"Incorrect initial options %x\n", options); "Incorrect initial options %x\n", options);
/* NEGATIVE TESTING - NO OPTIONS SET */ /* NEGATIVE TESTING - NO OPTIONS SET */
...@@ -1508,17 +1508,17 @@ static void test_EM_SETOPTIONS(void) ...@@ -1508,17 +1508,17 @@ static void test_EM_SETOPTIONS(void)
ok(dwStyle & ES_READONLY, "Readonly style not set by EM_SETOPTIONS\n"); ok(dwStyle & ES_READONLY, "Readonly style not set by EM_SETOPTIONS\n");
SetWindowLong(hwndRichEdit, GWL_STYLE, dwStyle & ~ES_READONLY); SetWindowLong(hwndRichEdit, GWL_STYLE, dwStyle & ~ES_READONLY);
options = SendMessage(hwndRichEdit, EM_GETOPTIONS, 0, 0); options = SendMessage(hwndRichEdit, EM_GETOPTIONS, 0, 0);
todo_wine ok(options & ES_READONLY, "Readonly option set by SetWindowLong\n"); ok(options & ES_READONLY, "Readonly option set by SetWindowLong\n");
/* Confirm that the text is still read only. */ /* Confirm that the text is still read only. */
SendMessage(hwndRichEdit, WM_CHAR, 'a', ('a' << 16) | 0x0001); SendMessage(hwndRichEdit, WM_CHAR, 'a', ('a' << 16) | 0x0001);
SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer); SendMessage(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM) buffer);
todo_wine ok(buffer[0]==text[0], ok(buffer[0]==text[0],
"EM_SETOPTIONS: Text changed! s1:%s s2:%s\n", text, buffer); "EM_SETOPTIONS: Text changed! s1:%s s2:%s\n", text, buffer);
oldOptions = options; oldOptions = options;
SetWindowLong(hwndRichEdit, GWL_STYLE, dwStyle|optionStyles); SetWindowLong(hwndRichEdit, GWL_STYLE, dwStyle|optionStyles);
options = SendMessage(hwndRichEdit, EM_GETOPTIONS, 0, 0); options = SendMessage(hwndRichEdit, EM_GETOPTIONS, 0, 0);
todo_wine ok(options == oldOptions, ok(options == oldOptions,
"Options set by SetWindowLong (%x -> %x)\n", oldOptions, options); "Options set by SetWindowLong (%x -> %x)\n", oldOptions, options);
DestroyWindow(hwndRichEdit); DestroyWindow(hwndRichEdit);
...@@ -5916,8 +5916,8 @@ static void test_autoscroll(void) ...@@ -5916,8 +5916,8 @@ static void test_autoscroll(void)
0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL);
ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError());
ret = SendMessage(hwnd, EM_GETOPTIONS, 0, 0); ret = SendMessage(hwnd, EM_GETOPTIONS, 0, 0);
todo_wine ok(ret & ECO_AUTOVSCROLL, "ECO_AUTOVSCROLL isn't set.\n"); ok(ret & ECO_AUTOVSCROLL, "ECO_AUTOVSCROLL isn't set.\n");
todo_wine ok(ret & ECO_AUTOHSCROLL, "ECO_AUTOHSCROLL isn't set.\n"); ok(ret & ECO_AUTOHSCROLL, "ECO_AUTOHSCROLL isn't set.\n");
ret = GetWindowLong(hwnd, GWL_STYLE); ret = GetWindowLong(hwnd, GWL_STYLE);
ok(!(ret & ES_AUTOVSCROLL), "ES_AUTOVSCROLL is set.\n"); ok(!(ret & ES_AUTOVSCROLL), "ES_AUTOVSCROLL is set.\n");
ok(!(ret & ES_AUTOHSCROLL), "ES_AUTOHSCROLL is set.\n"); ok(!(ret & ES_AUTOHSCROLL), "ES_AUTOHSCROLL is set.\n");
......
...@@ -905,7 +905,7 @@ static void test_EM_GETOPTIONS(void) ...@@ -905,7 +905,7 @@ static void test_EM_GETOPTIONS(void)
WS_POPUP|WS_VSCROLL|WS_HSCROLL, WS_POPUP|WS_VSCROLL|WS_HSCROLL,
0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL);
options = SendMessage(hwnd, EM_GETOPTIONS, 0, 0); options = SendMessage(hwnd, EM_GETOPTIONS, 0, 0);
todo_wine ok(options == ECO_AUTOVSCROLL, ok(options == ECO_AUTOVSCROLL,
"Incorrect initial options %x\n", options); "Incorrect initial options %x\n", options);
DestroyWindow(hwnd); DestroyWindow(hwnd);
} }
...@@ -922,7 +922,7 @@ static void test_autoscroll(void) ...@@ -922,7 +922,7 @@ static void test_autoscroll(void)
0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL);
ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError()); ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS, (int) GetLastError());
ret = SendMessage(hwnd, EM_GETOPTIONS, 0, 0); ret = SendMessage(hwnd, EM_GETOPTIONS, 0, 0);
todo_wine ok(ret & ECO_AUTOVSCROLL, "ECO_AUTOVSCROLL isn't set.\n"); ok(ret & ECO_AUTOVSCROLL, "ECO_AUTOVSCROLL isn't set.\n");
ok(!(ret & ECO_AUTOHSCROLL), "ECO_AUTOHSCROLL is set.\n"); ok(!(ret & ECO_AUTOHSCROLL), "ECO_AUTOHSCROLL is set.\n");
ret = GetWindowLong(hwnd, GWL_STYLE); ret = GetWindowLong(hwnd, GWL_STYLE);
todo_wine ok(ret & ES_AUTOVSCROLL, "ES_AUTOVSCROLL isn't set.\n"); todo_wine ok(ret & ES_AUTOVSCROLL, "ES_AUTOVSCROLL isn't set.\n");
......
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