Aric Stewart : user32: Implement IMR_QUERYCHARPOSITION handling in the edit control.
Alexandre Julliard
julliard at winehq.org
Tue May 7 15:54:05 CDT 2013
Module: wine
Branch: master
Commit: 652af4e294da3f99358d522c5f7320a7d63556fa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=652af4e294da3f99358d522c5f7320a7d63556fa
Author: Aric Stewart <aric at codeweavers.com>
Date: Tue May 7 08:06:22 2013 -0500
user32: Implement IMR_QUERYCHARPOSITION handling in the edit control.
---
dlls/user32/edit.c | 19 +++++++++++++++++++
include/imm.h | 9 +++++++++
2 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index 74e0ea4..1ce79db 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -5169,6 +5169,25 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B
case WM_IME_CONTROL:
break;
+ case WM_IME_REQUEST:
+ switch (wParam)
+ {
+ case IMR_QUERYCHARPOSITION:
+ {
+ LRESULT pos;
+ IMECHARPOSITION *chpos = (IMECHARPOSITION *)lParam;
+
+ pos = EDIT_EM_PosFromChar(es, es->selection_start + chpos->dwCharPos, FALSE);
+ chpos->pt.x = LOWORD(pos);
+ chpos->pt.y = HIWORD(pos);
+ chpos->cLineHeight = es->line_height;
+ chpos->rcDocument = es->format_rect;
+ result = 1;
+ break;
+ }
+ }
+ break;
+
default:
result = DefWindowProcT(hwnd, msg, wParam, lParam, unicode);
break;
diff --git a/include/imm.h b/include/imm.h
index d035072..aa2fa1d 100644
--- a/include/imm.h
+++ b/include/imm.h
@@ -129,6 +129,15 @@ typedef struct _tagCOMPOSITIONFORM
typedef BOOL (CALLBACK* IMCENUMPROC)(HIMC, LPARAM);
+typedef struct _tagIMECHARPOSITION
+{
+ DWORD dwSize;
+ DWORD dwCharPos;
+ POINT pt;
+ UINT cLineHeight;
+ RECT rcDocument;
+} IMECHARPOSITION, *LPIMECHARPOSITION;
+
/* wParam for WM_IME_CONTROL */
#define IMC_GETCANDIDATEPOS 0x0007
#define IMC_SETCANDIDATEPOS 0x0008
More information about the wine-cvs
mailing list