From 8e639ec392b1652edd4a0f121e534f036b4ceac9 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Mon, 17 Dec 2007 17:56:32 +0100 Subject: [PATCH] riched20: Fix bugs in EM_SETOPTIONS. Add SELECTIONBAR to mask, and use settings rather then lParam. 2 subtle bugs that prevent selectionbar from working. --- dlls/riched20/editor.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 343da8bb7aa..01d60c52afc 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1569,7 +1569,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, * setting the bit to work */ DWORD mask = ECO_VERTICAL | ECO_AUTOHSCROLL | ECO_AUTOVSCROLL | - ECO_NOHIDESEL | ECO_READONLY | ECO_WANTRETURN; + ECO_NOHIDESEL | ECO_READONLY | ECO_WANTRETURN | ECO_SELECTIONBAR; DWORD raw = GetWindowLongW(hWnd, GWL_STYLE); DWORD settings = mask & raw; @@ -1589,22 +1589,23 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, } SetWindowLongW(hWnd, GWL_STYLE, (raw & ~mask) | (settings & mask)); - if (lParam & ECO_AUTOWORDSELECTION) + if (settings & ECO_AUTOWORDSELECTION) FIXME("ECO_AUTOWORDSELECTION not implemented yet!\n"); - if (lParam & ECO_SELECTIONBAR) + if (settings & ECO_SELECTIONBAR) editor->selofs = 16; else editor->selofs = 0; + ME_WrapMarkedParagraphs(editor); - if (lParam & ECO_VERTICAL) + if (settings & ECO_VERTICAL) FIXME("ECO_VERTICAL not implemented yet!\n"); - if (lParam & ECO_AUTOHSCROLL) + if (settings & ECO_AUTOHSCROLL) FIXME("ECO_AUTOHSCROLL not implemented yet!\n"); - if (lParam & ECO_AUTOVSCROLL) + if (settings & ECO_AUTOVSCROLL) FIXME("ECO_AUTOVSCROLL not implemented yet!\n"); - if (lParam & ECO_NOHIDESEL) + if (settings & ECO_NOHIDESEL) FIXME("ECO_NOHIDESEL not implemented yet!\n"); - if (lParam & ECO_WANTRETURN) + if (settings & ECO_WANTRETURN) FIXME("ECO_WANTRETURN not implemented yet!\n"); return settings;