Hongbo Ni : riched32: Implement WM_UNICHAR support.
Alexandre Julliard
julliard at winehq.org
Tue Jul 29 07:16:45 CDT 2008
Module: wine
Branch: master
Commit: 3cb685c861ea803dbd05b0b5a9566b9f971ecbad
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3cb685c861ea803dbd05b0b5a9566b9f971ecbad
Author: Hongbo Ni <hongbo at njstar.com>
Date: Wed Jul 23 21:55:46 2008 +1000
riched32: Implement WM_UNICHAR support.
---
dlls/riched20/editor.c | 28 ++++++++++++++++++++++------
1 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 1e5a395..c747c31 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -140,10 +140,10 @@
+ WM_SETTEXT (resets undo stack !) (proper style?) ANSI&Unicode
- WM_STYLECHANGING
- WM_STYLECHANGED (things like read-only flag)
- - WM_UNICHAR
-
+ + WM_UNICHAR
+
Notifications
-
+
* EN_CHANGE (sent from the wrong place)
- EN_CORRECTTEXT
- EN_DROPFILES
@@ -2101,10 +2101,9 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
UNSUPPORTED_MSG(EM_SETWORDBREAKPROCEX)
UNSUPPORTED_MSG(WM_STYLECHANGING)
UNSUPPORTED_MSG(WM_STYLECHANGED)
-/* UNSUPPORTED_MSG(WM_UNICHAR) FIXME missing in Wine headers */
-
+
/* Messages specific to Richedit controls */
-
+
case EM_STREAMIN:
return ME_StreamIn(editor, wParam, (EDITSTREAM*)lParam, TRUE);
case EM_STREAMOUT:
@@ -3263,6 +3262,23 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
}
return 0;
}
+ case WM_UNICHAR:
+ if (unicode)
+ {
+ if(wParam == UNICODE_NOCHAR) return TRUE;
+ if(wParam <= 0x000fffff)
+ {
+ if(wParam > 0xffff) /* convert to surrogates */
+ {
+ wParam -= 0x10000;
+ SendMessageW(editor->hWnd, WM_CHAR, (wParam >> 10) + 0xd800, 0);
+ SendMessageW(editor->hWnd, WM_CHAR, (wParam & 0x03ff) + 0xdc00, 0);
+ }
+ else SendMessageW(editor->hWnd, WM_CHAR, wParam, 0);
+ }
+ return 0;
+ }
+ break;
case EM_STOPGROUPTYPING:
ME_CommitUndo(editor); /* End coalesced undos for typed characters */
return 0;
More information about the wine-cvs
mailing list