riched20: implement ECO_NOHIDESEL of EM_SETOPTIONS
Brian Chang
brianch at seas.ucla.edu
Wed Mar 1 00:12:10 CST 2006
Hello. My name is Brian Chang and I'm a resident of Los Angeles, CA, USA currently attending UCLA. I hereby certify that I wrote this code without copying from anyone else's sources, and I've never seen any secret Microsoft source code.
editor.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
Index: dlls/riched20/editor.c
===================================================================
RCS file: /home/wine/wine/dlls/riched20/editor.c,v
retrieving revision 1.101
diff -a -u -r1.101 editor.c
--- dlls/riched20/editor.c 27 Feb 2006 15:35:12 -0000 1.101
+++ dlls/riched20/editor.c 1 Mar 2006 05:27:21 -0000
@@ -1432,8 +1432,6 @@
FIXME("ECO_AUTOHSCROLL not implemented yet!\n");
if (lParam & ECO_AUTOVSCROLL)
FIXME("ECO_AUTOVSCROLL not implemented yet!\n");
- if (lParam & ECO_NOHIDESEL)
- FIXME("ECO_NOHIDESEL not implemented yet!\n");
if (lParam & ECO_WANTRETURN)
FIXME("ECO_WANTRETURN not implemented yet!\n");
@@ -2059,10 +2057,18 @@
}
break;
case WM_SETFOCUS:
+ /* show selection if it isn't already because of ECO_NOHIDESEL */
+ if ((GetWindowLongW(hWnd, GWL_STYLE) & ECO_NOHIDESEL)==0)
+ RichEditANSIWndProc(hWnd, EM_HIDESELECTION, 0, 0);
+
ME_ShowCaret(editor);
ME_SendOldNotify(editor, EN_SETFOCUS);
return 0;
case WM_KILLFOCUS:
+ /* hide the selection if we don't have ECO_NOHIDESEL set */
+ if ((GetWindowLongW(hWnd, GWL_STYLE) & ECO_NOHIDESEL)==0)
+ RichEditANSIWndProc(hWnd, EM_HIDESELECTION, 1, 0);
+
ME_HideCaret(editor);
ME_SendOldNotify(editor, EN_KILLFOCUS);
return 0;
More information about the wine-patches
mailing list