Hongbo Ni : user32: Implement WM_UNICHAR for edit control.

Alexandre Julliard julliard at winehq.org
Tue Jul 29 07:16:45 CDT 2008


Module: wine
Branch: master
Commit: aaf67e9e737686c11eb3dc1a9802eff6a539320b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=aaf67e9e737686c11eb3dc1a9802eff6a539320b

Author: Hongbo Ni <hongbo at njstar.com>
Date:   Wed Jul 23 21:54:39 2008 +1000

user32: Implement WM_UNICHAR for edit control.

---

 dlls/user32/edit.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index b37b5dc..dcf9550 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -860,6 +860,24 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
 		break;
 	}
 
+        case WM_UNICHAR:
+                if (unicode)
+                {
+                    if (wParam == UNICODE_NOCHAR) return TRUE;
+                    if (wParam <= 0x000fffff)
+                    {
+                        if(wParam > 0xffff) /* convert to surrogates */
+                        {
+                            wParam -= 0x10000;
+                            EDIT_WM_Char(es, (wParam >> 10) + 0xd800);
+                            EDIT_WM_Char(es, (wParam & 0x03ff) + 0xdc00);
+                        }
+                        else EDIT_WM_Char(es, wParam);
+                    }
+                    return 0;
+                }
+                break;
+
 	case WM_CLEAR:
 		EDIT_WM_Clear(es);
 		break;




More information about the wine-cvs mailing list