user32: Implement IMR_QUERYCHARPOSITION handling in the edit control.
This commit is contained in:
parent
b98ef8f087
commit
652af4e294
|
@ -5169,6 +5169,25 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B
|
||||||
case WM_IME_CONTROL:
|
case WM_IME_CONTROL:
|
||||||
break;
|
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:
|
default:
|
||||||
result = DefWindowProcT(hwnd, msg, wParam, lParam, unicode);
|
result = DefWindowProcT(hwnd, msg, wParam, lParam, unicode);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -129,6 +129,15 @@ typedef struct _tagCOMPOSITIONFORM
|
||||||
|
|
||||||
typedef BOOL (CALLBACK* IMCENUMPROC)(HIMC, LPARAM);
|
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 */
|
/* wParam for WM_IME_CONTROL */
|
||||||
#define IMC_GETCANDIDATEPOS 0x0007
|
#define IMC_GETCANDIDATEPOS 0x0007
|
||||||
#define IMC_SETCANDIDATEPOS 0x0008
|
#define IMC_SETCANDIDATEPOS 0x0008
|
||||||
|
|
Loading…
Reference in New Issue